-
Notifications
You must be signed in to change notification settings - Fork 53
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
allow_population_by_field_name = True
should be added to more generated types for better tooling (e.g. mypy) support
#1505
Comments
This seems to work for me? =====
|
@degenaro Are you perhaps running this from a location where this mypy config block would get picked up that appears to just ignore this error? |
Not familiar with mypy. I tried --verbose for more information. Everything seems nominal. Result is success.
|
I'm happy to have a virtual meeting to discuss, if you like. Perhaps you can help me to reproduce? |
This output confirms that To reproduce the error in this issue:
|
The good news is that I'm able to recreate now:
The bad news is that adding
|
Here is a hacked version of the test.py.
And here is running directly via python invocation, which runs fine it seems:
|
I think that was the only difference between There is a workardound |
Describe the bug
The following python file is reported as an error when using additional python static checking such as
mypy
. This also prevents IDE autocomplete from working for some combination of Python support:This is likely because
allow_population_by_field_name = True
is not set in the config of all generated types that have aliases that include-
.To Reproduce
mypy
on a file with the above contents.Expected behavior
Mypy should not report an error.
Screenshots / Logs.
If applicable, add screenshots to help explain your problem.
Workaround
The error can be ignored in configuration or with line comments:
# type: ignore[call-arg]
Environment
mypy 1.7.1 (compiled: yes)
The text was updated successfully, but these errors were encountered: