Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

mypy run on single file

MyPy single file options
MyPy is a strongly recommended type checker, though others exist. We typically use a per-project .mypy.ini to configure MyPy default behavior. To tell MyPy to only check certain files, use the MyPy –follow-imports= option like:

mypy --follow-imports=skip myproj/foo.py myproj/bar.py
Only certain directories can be checked like:

mypy --follow-imports=skip myproj/sub/ myproj/sub2
Once the type checks pass via mypy --follow-imports=skip, we recommend trying

mypy --follow-imports=silent
to improve robustness of the type check for those files / directories.
Source by www.scivision.dev #
 
PREVIOUS NEXT
Tagged: #mypy #run #single #file
ADD COMMENT
Topic
Name
9+9 =