Add ability to use generic container types
See original GitHub issueIs your feature request related to a problem? Please describe.
We have immutability requirements and therefore do not use list
/typing.List
nor dict
/typing.Dict
Describe the solution you’d like
An option that would use typing.Sequence
instead of typing.List
and typing.Mapping
instead of typing.Dict
If use_standard_collections
option is set, then import from collections.abc
instead of typing
Describe alternatives you’ve considered
In my feature branch I have a post-generation step that modifies the output file
Additional context
Soon, every Datadog Agent integration will use this to generate models for user configuration 🙂
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Generics: How They Work and Why They Are Important - Oracle
At times, it is beneficial to have the ability to use more than one generic type in a class or interface. Multiple type...
Read more >Java Generics and containers of mixed types - Stack Overflow
I have a question about using mixed generic types in a container. I have something like this: interface Processor<T> { T process(T value);...
Read more >CS 201: Lecture 10: Generic Methods and Classes
The ability to make a class generic is especially useful for container classes, also known as collections. A container class is one which...
Read more >Item 33: Consider typesafe heterogeneous containers - InformIT
In summary, the normal use of generics, exemplified by the collections APIs, restricts you to a fixed number of type parameters per container....
Read more >Generic containers in C - Attila's Blog
All right, the generic container is basically ready, but how do we use it? First, we need to add some supported data types....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://datadoghq.dev/integrations-core/meta/config-models/
https://github.com/DataDog/integrations-core/pull/8675 is merged and I’ve started the syncing of every integration: https://github.com/DataDog/integrations-core/pulls 😄