pytest-dev / py

Python development support library (note: maintenance only)
MIT License
67 stars 105 forks source link

Type annotations are invalid with older versions of mypy #250

Closed mctwynne closed 3 years ago

mctwynne commented 4 years ago

With versions of mypy<=0.620 the new type stubs introduced in 1.9.0 result in the following error:

venv/lib/python3.6/site-packages/py/path.pyi:184: error: invalid type comment or annotation

This is an older version of mypy so I'm not completely surprised, but is there anything that could be done to support it?

Thanks!

bluetech commented 4 years ago

Hi @mctwynne,

We'd prefer to not support older mypy versions if possible, so the obvious question is, is there any reason you can't upgrade mypy?

Unfortunately there isn't any provision (that I'm aware of) for saying "these type definitions require these mypy versions", like there are with normal dependencies or Python versions.

bluetech commented 3 years ago

Going to close now per comment above.