We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#1598 introduce stub class for ForwardRef without __init__ for type checking so mypy raise error for ForwardRef https://github.com/samuelcolvin/pydantic/blob/e985857e5a9ede8d346b010a5a039aa84a089826/pydantic/typing.py#L31-L33 I not pretty sure is this is planned or bug and if this is a bug I can fix it with stub __init__
__init__
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
pydantic version: 1.6.1 pydantic compiled: False install path: \venv\Lib\site-packages\pydantic python version: 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] platform: Windows-10-10.0.18362-SP0 optional deps. installed: ['typing-extensions', 'email-validator']
test.py
# For python version < 3.7 from pydantic.typing import ForwardRef ref = ForwardRef('A') class A: ...
mypy test.py > test.py:3: error: Too many arguments for "ForwardRef"
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Bug
#1598 introduce stub class for ForwardRef without
__init__
for type checking so mypy raise error for ForwardRefhttps://github.com/samuelcolvin/pydantic/blob/e985857e5a9ede8d346b010a5a039aa84a089826/pydantic/typing.py#L31-L33
I not pretty sure is this is planned or bug and if this is a bug I can fix it with stub
__init__
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:test.py
The text was updated successfully, but these errors were encountered: