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

AttrsInstance protocol in the new attrs namespace #1089

Closed
tsx opened this issue Jan 19, 2023 · 2 comments · Fixed by #1090
Closed

AttrsInstance protocol in the new attrs namespace #1089

tsx opened this issue Jan 19, 2023 · 2 comments · Fixed by #1090

Comments

@tsx
Copy link
Contributor

tsx commented Jan 19, 2023

AttrsInstance protocol was added in #890

However attrs.asdict and attrs.astuple still take Any as the instance. This reduces type safety for people using the "modern" API. Was there any reason for these two functions being left out of the original AttrsInstance change?

@Tinche
Copy link
Member

Tinche commented Jan 19, 2023

I think we just forgot. A good opportunity for a quick PR!

@tsx
Copy link
Contributor Author

tsx commented Jan 19, 2023

Opened a quick PR.

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

Successfully merging a pull request may close this issue.

2 participants