Skip to content

Add generic typing to registry#69

Draft
dakinggg wants to merge 4 commits intoexplosion:v3from
dakinggg:types
Draft

Add generic typing to registry#69
dakinggg wants to merge 4 commits intoexplosion:v3from
dakinggg:types

Conversation

@dakinggg
Copy link
Copy Markdown

@dakinggg dakinggg commented Feb 18, 2024

Not sure if this is something y'all are interested in adding, but I wanted to use catalogue with static typing on what the registry contains (Even though you've called it func everywhere, its quite useful to have other types in the registry). Thought I'd see if you wanted to upstream the typing change.

@dakinggg dakinggg marked this pull request as ready for review February 18, 2024 09:18
raise RegistryError(f"Namespace already exists: {namespace}")
return Registry(namespace, entry_points=entry_points)

if generic_type is None:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't exactly right...but I couldn't figure out how to get mypy to accept a direct default for the argument

@svlandeg svlandeg deleted the branch explosion:v3 March 22, 2024 09:58
@svlandeg svlandeg closed this Mar 22, 2024
@svlandeg svlandeg reopened this Mar 22, 2024
@svlandeg svlandeg marked this pull request as draft March 22, 2024 10:09
@svlandeg svlandeg changed the base branch from master to v3 March 22, 2024 10:31
@svlandeg svlandeg mentioned this pull request Mar 22, 2024
@svlandeg svlandeg added the enhancement New feature or request label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants