Skip to content

Python: Add type-tracking test for attrs set in functions/methods #6046

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

Merged
merged 5 commits into from
Jun 9, 2021

Conversation

RasmusWL
Copy link
Member

@RasmusWL RasmusWL commented Jun 8, 2021

I wasn't quite sure how to attack solving this, but wanted to get the tests in

Copy link
Contributor

@tausbn tausbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added a few suggestions where I believe the test annotations to be incomplete.

As for the tests themselves, I'm not sure how we would be extending type tracking to also handle instance variables (though admittedly I haven't thought about it much), but having the tests is always useful (if nothing else it demonstrates what the limits of the approach are).

Co-authored-by: Taus <tausbn@github.com>
@RasmusWL
Copy link
Member Author

RasmusWL commented Jun 9, 2021

Sure, those annotations are more complete 👍

This one just works out of the box 💪
@RasmusWL RasmusWL requested a review from tausbn June 9, 2021 12:23
@tausbn tausbn merged commit e3a6daa into github:main Jun 9, 2021
@RasmusWL RasmusWL deleted the typetracking-attributes branch June 9, 2021 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants