Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Use property decorator to support typing#2015
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
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.
Thanks a lot, that's a nice improvement, making the implementation more idiomatic as well.
Once CI passes this can be merged.
EliahKagan commentedMar 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Comparing That doesn't necessarily mean that this shouldn't be merged. GitPython is not currently |
Fixed the failing lint. I guess some of those new mypy errors caused by getters not returning permissive |
I have to leave the decision to@EliahKagan as well. Since CI can't catch anything I'd be quite confident that this is OK, and if not somebody might be annoyed enough to help with the fix. Since typing is 'tacked on', maybe there is no way to keep it all working anyway, as tools change, and the language is too dynamic as well. |
I think it is definitely better to merge this than to let it wait indefinitely. There might be an improvement that can be made, but I'm not sure. I also don't know when I would get to looking into it further. I have no objection to this being merged at any time; it can always be revisited. |
4bedb05
intogitpython-developers:mainUh oh!
There was an error while loading.Please reload this page.
It seems this type of properties are not supported by type checkers (mypy, pyright) and using
property
decorator fixes the issue.See example below.