-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
mypy plugin error: 'tuple' object does not support item assignment #62
Labels
bug
Something isn't working
Comments
hugosenari
changed the title
mypy plugin error: TypeError: 'tuple' object does not support item assignment
mypy plugin error: 'tuple' object does not support item assignment
Oct 22, 2020
hugosenari
added a commit
to hugosenari/pfun
that referenced
this issue
Oct 29, 2020
fix suned#62: /pfun/mypy_plugin.py", line 396, in _combine_hook ret_type_args[1] = combined_error_type TypeError: 'tuple' object does not support item assignment
Did you ever find the reproducing example? I tried |
suned
pushed a commit
to hugosenari/pfun
that referenced
this issue
Feb 2, 2021
suned
pushed a commit
to hugosenari/pfun
that referenced
this issue
Feb 2, 2021
Can you try this please, is the minimal example I could found. from pfun.either import catch
@catch
def hello_world() -> str:
return 'Hello World' At least here it returns:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably something I'm doing wrong (ie not informing types arguments of Either), but...
mypy
MethodContext.default_return_type.args
may return atuple
instead of alist
.Raising ''TypeError: 'tuple' object does not support item assignment" for code above
We could expect that if isn't a list dev made something wrong - like I did - but this and similar assignments may cause unintended side effects 🤔
The text was updated successfully, but these errors were encountered: