id = "mypy" name = "mypy" homepage = "https://mypy-lang.org" description = "Mypy is a static type checker for Python." executables = ["mypy", "dmypy"] [dotfiles] # https://mypy.readthedocs.io/en/stable/config_file.html — when no mypy.ini, # .mypy.ini, pyproject.toml or setup.cfg is found by walking up from the # working directory, mypy falls back to "$XDG_CONFIG_HOME/mypy/config", then # "~/.config/mypy/config", and finally "~/.mypy.ini". The first two are the # variable and its default — one file, which is [configHome]/mypy/config. On # Windows the last one is %USERPROFILE%\.mypy.ini, which resolves to the same # ~/.mypy.ini. The project-level files are not user-level and are not listed. paths = [ "[configHome]/mypy/config", "~/.mypy.ini", ] exclude = [] # An INI file of type-checking strictness flags and per-module overrides. # Nothing in it is a credential. secret = [] # Read once at startup by a process that then exits. side_effect = false # No machine_lines: the strictness flags and per-module sections are exactly # what a user wants on every machine. cache_dir and mypy_path can name a local # directory, but they are just as often relative and shared on purpose, so # nothing here is claimed as machine-local. [commands] format = 1 label = "Type check" description = "Type check Python files or directories with mypy. Report generators, cache tuning and daemon mode are left out." quality = "ai-draft" base = "fig:mypy" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/mypy.ts" license = "MIT" [[commands.field]] id = "targets" label = "Files or directories" type = "path" position = 0 multiple = true min = 1 path = { kind = "any", role = "input" } sources = ["fig"] [[commands.field]] id = "strict" label = "Enable all optional checks" type = "boolean" option = ["--strict"] sources = ["fig"] [[commands.field]] id = "ignore_missing" label = "Ignore missing imports" type = "boolean" option = ["--ignore-missing-imports"] sources = ["fig"] [[commands.field]] id = "check_untyped" label = "Check bodies of untyped functions" type = "boolean" option = ["--check-untyped-defs"] sources = ["fig"] [[commands.field]] id = "disallow_untyped" label = "Disallow untyped definitions" type = "boolean" option = ["--disallow-untyped-defs"] sources = ["fig"] [[commands.field]] id = "warn_unused_ignores" label = "Warn about unused # type: ignore" type = "boolean" option = ["--warn-unused-ignores"] sources = ["fig"] [[commands.field]] id = "warn_return_any" label = "Warn about returning Any" type = "boolean" option = ["--warn-return-any"] sources = ["fig"] [[commands.field]] id = "python_version" label = "Python version (e.g. 3.12)" type = "string" option = ["--python-version"] sources = ["fig"] [[commands.field]] id = "config_file" label = "Config file" type = "path" option = ["--config-file"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "exclude" label = "Exclude regex" type = "string" option = ["--exclude"] sources = ["fig"] [[commands.field]] id = "pretty" label = "Pretty error output" type = "boolean" option = ["--pretty"] sources = ["fig"] [[commands.field]] id = "show_columns" label = "Show column numbers" type = "boolean" option = ["--show-column-numbers"] sources = ["fig"] [[commands.field]] id = "no_incremental" label = "Disable incremental mode" type = "boolean" option = ["--no-incremental"] sources = ["fig"] [[commands.task]] id = "check" label = "Check" fields = ["targets"] required = ["targets"] [[commands.task]] id = "strict" label = "Strict check" fields = ["targets", "strict"] required = ["targets"] set = { strict = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["targets", "strict", "ignore_missing", "python_version", "config_file"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["check_untyped", "disallow_untyped", "warn_unused_ignores", "warn_return_any", "exclude", "pretty", "show_columns", "no_incremental"]