Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding runtime_checkable to AttrsInstance #1388

Open
ryan-minato opened this issue Dec 23, 2024 · 0 comments
Open

Adding runtime_checkable to AttrsInstance #1388

ryan-minato opened this issue Dec 23, 2024 · 0 comments

Comments

@ryan-minato
Copy link

Is it possible to add the runtime_checkable decorator to AttrsInstance protocol?

class AttrsInstance(Protocol):
pass

In my project, I am working on a decorator that automates converting a dict into an AttrsInstance.
To perform reflection checks on input definitions, I found myself needing to subclass AttrsInstance without modifying it—just to add the runtime_checkable decorator.
It would be incredibly helpful if the attrs library's definition already included runtime_checkable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant