Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is a great addition! But, this does raise an important topic to discuss.
Currently, we do not treat properties as
ClassVar
s. I guess that we need to fix that. And mark ones that apply asClassVar
s.@danifus can you please open a new issue?
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.
Hi, was this comment intended for me or @davidhalter?
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.
Oups! 😆 My bad!
But, feel free to participate!
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.
@sobolevn I don't really understand what needs to be fixed. I see that the CI is still failing even after I force pushed an amended commit. I'm guessing that has something to do with the Mypy plugin. But since I'm not using Mypy, I'm only interested in correct type annotations and I would appreciate if you guys could take it from here.
I obviously understand that this is more work, but it's not my forte. As a temporary measure, I might just ship a patched version in Jedi until this gets fixed.
Still thanks for looking at it @sobolevn!
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.
@sobolevn Failing tests are not a matter of the bug I've fixed, I've just checked that. Introducing ClassVars to our stubs it quite a big change. It'd be awesome @davidhalter if you could create an issue on this one. As @sobolevn wrote, marking properties that apply as
ClassVar
would be a lot of help too. Thank you for your work, I can take it from here if you want me to 😄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.
@kszmigiel Yeah feel free to take it from here, I really have no idea :)
I can of course create an issue, but I'd rather not, since I really don't understand what the issue is. The issue would probably have the content "ClassVar for
Model.objects
doesn't work". If that has value for you, I'm fine doing that :).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.
@davidhalter Sure thing, I'll create an issue for that later, thanks for pointing this out 😄