-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Add attr.__version_info__ #580
Conversation
I think you should add it to the init.pyi and the other missing ones like this:
|
Technically, mypy knows the types of VersionInfo…but if I import it, I get the errors…is there a way around here? Or do I have to either fix mypy for attrs or duplicate the information?
are the new ones. |
Oh. You shouldn't run |
Although:
is complaining that
the variable name changed in the 3rd instance |
Oh. You shouldn't run mypy on attrs source code. At least we haven't made it pass type checking. The only file that passes type checking is typing_example.py
I’m not! 🙈 I’m just adding a `from ._version import VersionInfo` And it seem to follow the imports into _make?
|
Oh I see. You added |
This allows users to check for features and avoid deprecation warnings without breaking backward compatibility.
Now that I've rebased, if I add a line
|
OK I'm not happy but I think this it r4r now. And I thought this is gonna a bunch of lines – I'll never learn! 🤪 |
All the typing stuff looks good to me! |
Thanks David! Anyone else for the rest? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't exactly know the protocol but I only made 2 comments which you can fix before merging if you want.
Thanks, you followed the protocol perfectly! 💛 |
This allows users to check for features and avoid deprecation warnings without
breaking backward compatibility.
This is especially important with the cmp → order/eq split.
@euresti do I need to add it to
__init__.pyi
if it's an attrs class? I tried to just import it into it, but that started throwing errors about stuff in_make.py
…