Skip to content
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

Fix 5903: wrong placement of decorators for methods with instance field declarations #7269

Merged
merged 6 commits into from Aug 7, 2019

Conversation

@gantsevdenis
Copy link
Contributor

commented Jul 27, 2019

pretty old issue #5903, not sure if was worth it, but looked simple enough

Copy link
Collaborator

left a comment

Apologies for the delay in reviewing this.

This seems good to me. Could you add a test, and then we'll merge it?

@@ -401,6 +406,8 @@ def visit_func_def(self, o: FuncDef, is_abstract: bool = False) -> None:
name = var.name()
annotated_type = (o.unanalyzed_type.arg_types[i]
if isinstance(o.unanalyzed_type, CallableType) else None)
# I think the name check is incorrect: there are libraries which
# name their 0th argument other than self/cls

This comment has been minimized.

Copy link
@msullivan

msullivan Aug 5, 2019

Collaborator

I'd drop the extra spaces

gantsevdenis added 2 commits Aug 6, 2019
@gantsevdenis

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

thank you for your review! I have corrected accordingly

Copy link
Collaborator

left a comment

Thank you! Looks great.

@msullivan msullivan merged commit 4c890e0 into python:master Aug 7, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.