3 ms·
So mypy runs "at run time"? I guess that makes sense, I thought the annotations provided some form of checking too, but now I realize that I should really spend
by mardifoufs 3y ago
So mypy runs "at run time"? I guess that makes sense, I thought the annotations provided some form of checking too, but now I realize that I should really spend some time to inform myself better :').
- stableviper 3y agoNo, it's more that pydantic runs "at run time" while mypy not.
- woodruffw 3y agoSort of -- mypy is its own standalone program, and you run it to typecheck your program's type annotations. It does some evaluation of the Python program (specifically imports and some very basic conditional evaluation, among other things), but it never really executes the codebase itself.
- gabereiser 3y agoMypy runs as a type linter/checker. See https://mypy-lang.org/ https://mypy-lang.org/