I'm surprised we don't yet have a mypy plugin that understands the mechanics of pytest fixtures and parametrize. Am I missing something?

@nedbat mypy is not the mostly used typing tool, and the more widely used ones eg pylance don't support plugins. Also mypy plugin development is a bottomless pit of despair , that too

@zzzeek Also, mypy isn't the most widely used? I would have thought it was clearly the most widely used. How do you determine that?

@nedbat @zzzeek I think it depends how you define "used". Pylance / Pyright wipes the floor with Mypy due to being the mechanics that give code completion to VS Code. But when it comes to actually check types in a code base, Mypy is #1 by far AFAICT. Unfortunately, the VS Code situation made Pyright the lowest common denominator, because otherwise everyone complains about broken code completion / linting. Guess how I know.

Follow

@hynek @nedbat @zzzeek it all depends on the type of code you write I suppose because I would say that mypy is the lowest common denominator as pyright covers typing more fully than mypy. It doesn't have plugins which is the downside when neither can support some construct and *someone* develops a mypy plugin for it but not many do.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.