-
-
Notifications
You must be signed in to change notification settings - Fork 278
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 __new__
and __call__
toObjectModel
and ClassModel
#1606
Conversation
Pull Request Test Coverage Report for Build 2605029910
💛 - Coveralls |
Thanks for pushing forward on this. I haven't found time to do a review yet, but I did quickly check it against pylint-dev/pylint#6402 and this doesn't pass its test case. Was that expected? |
Yeah! Ultimately we should merge #1519 as well. However, since |
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.
Looks really good! One last Q
Steps
Description
/CC @jacobtylerwalls
Part of #1519.
This was what I was talking about in #1519 (comment).
__new__
and__call__
are part of the models forobject
andclasses
. Thus, instead of adding them asattr___ne__
I think it makes sense to try and define them.One thing I wonder is whether this should indeed be properties. But looking at other methods I think they should? See for example:
https://github.com/PyCQA/astroid/blob/01db68b1b37fdfa4d7899fa1ba71015b33efb34b/astroid/interpreter/objectmodel.py#L288-L289
Type of Changes