Error importing plugin "pydantic.mypy": cannot import name TypeVarDef
See original GitHub issueChecks
- I added a descriptive title to this issue
- I have searched (google, github) for similar issues and couldn’t find anything
- I have read and followed the docs and still think this is a bug
On the newest pydantic and newest mypy (0.920) I get:
mypy .
pyproject.toml:1: error: Error importing plugin "pydantic.mypy": cannot import name TypeVarDef
Found 1 error in 1 file (errors prevented further checking)
Bug
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
pydantic version: 1.8.2
pydantic compiled: True
install path: /Users/USERNAME/opt/anaconda3/envs/ENVNAME/lib/python3.9/site-packages/pydantic
python version: 3.9.7 (default, Sep 16 2021, 08:50:36) [Clang 10.0.0 ]
platform: macOS-10.16-x86_64-i386-64bit
optional deps. installed: ['dotenv', 'typing-extensions']
Related issues in mypy issue tracker: https://github.com/python/mypy/issues/11767
Issue Analytics
- State:
- Created 2 years ago
- Reactions:27
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Error importing plugin "pydantic.mypy": cannot import name ...
Error importing plugin "pydantic.mypy": cannot import name TypeVarDef # ... cannot import name TypeVarDef Found 1 error in 1 file (errors ...
Read more >pipeline fails with 'cannot import name TypeVarDef' - geomar
python run-test: commands[0] | mypy demessaging setup.cfg:74: error: Error importing plugin "pydantic.mypy": cannot import name TypeVarDef ...
Read more >tiangolo/fastapi - Gitter
setup.cfg:27: error: Error importing plugin 'pydantic.mypy': No module named 'pydantic' Found 1 error in 1 file (checked 5 source files).
Read more >Mypy plugin - pydantic
With the pydantic mypy plugin, you can fearlessly refactor your models knowing mypy will catch any mistakes if your field names or types...
Read more >How can mypy accept pydantic's constr() types? - Stack Overflow
I have this code: from pydantic import BaseModel, constr DeptNumber = constr(min_length ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@samuelcolvin do you know when this might get released?
For people who are wondering, version
1.9.1is available on pip and includes this fix