Skip to content

Conversation

@kszmigiel
Copy link
Member

It works, but I'm afraid it will backfire in the future. Let's see if it passes tests

@kszmigiel kszmigiel requested a review from sobolevn July 21, 2020 12:11
for argument in method_node.arguments[1:]:
argument.type_annotation = AnyType(TypeOfAny.unannotated)
prepared_arguments.append(argument)
try:
Copy link
Member

Choose a reason for hiding this comment

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

Let's write it like this:

try:
    arguments = method_node.arguments[1:]
except AttributeError:
    arguments = []

@sobolevn
Copy link
Member

Thanks a lot, @kszmigiel!

@sobolevn sobolevn merged commit 3915aa0 into typeddjango:master Jul 21, 2020
@kszmigiel kszmigiel mentioned this pull request Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

mypy crash when .mypy_cache is present

2 participants