<#3203 refactor: Make `SchemaSource` generic on an...
# meltano-repo-activity
g
#3203 refactor: Make
SchemaSource
generic on any hashable key type
Pull request opened by edgarrmondragon ## Related • #2746 • #3190 ## Summary by Sourcery Make SchemaSource and related classes generic on a hashable key type to improve type flexibility Enhancements: • Introduce a _TKey TypeVar bound to Hashable and parameterize SchemaSource and StreamSchema classes with it • Update SchemaSource internal cache and methods (get_schema, fetch_schema) to use the generic key type • Annotate OpenAPISchema and SchemaDirectory to specify the str key type for their SchemaSource instances ## Summary by Sourcery Make SchemaSource and related classes generic over a hashable key type to improve type flexibility. Enhancements: • Introduce a TypeVar (_TKey) bound to Hashable and parameterize SchemaSource and StreamSchema classes with it • Update SchemaSource internal cache and schema retrieval methods (get_schema, fetch_schema) to use the generic key type • Parameterize OpenAPISchema and SchemaDirectory as SchemaSource[str] to retain string-specific behavior • Adjust TypeVar and override imports to choose between typing and typing_extensions based on Python version meltano/sdk