Configuration comment format
Flags correspond to config file flags but allowhyphens to be substituted for underscores.
Values are specified using =
, but = True
may be omitted:
- # mypy: disallow-any-generics
- # mypy: always-true=FOO
Multiple flags can be separated by commas or placed on separatelines. To include a comma as part of an option’s value, place thevalue inside quotes:
- # mypy: disallow-untyped-defs, always-false="FOO,BAR"
Like in the configuration file, options that take a boolean value may beinverted by adding no-
to their name or by (when applicable)swapping their prefix from disallow
to allow
(and vice versa):
- # mypy: allow-untyped-defs, no-strict-optional