Miscellaneous

  • —junit-xml JUNIT_XML
  • Causes mypy to generate a JUnit XML test result document withtype checking results. This can make it easier to integrate mypywith continuous integration (CI) tools.
  • —find-occurrences CLASS.MEMBER
  • This flag will make mypy print out all usages of a class memberbased on static type information. This feature is experimental.
  • —scripts-are-modules
  • This flag will give command line arguments that appear to bescripts (i.e. files whose name does not end in .py)a module name derived from the script name rather than the fixedname main.

This lets you check more than one script in a single mypy invocation.(The default main is technically more correct, but if youhave many scripts that import a large package, the behavior enabledby this flag is often more convenient.)