From d4be3a8709ef66b6365b3c285e9456fba6e2ddd8 Mon Sep 17 00:00:00 2001 From: spageektti Date: Tue, 28 May 2024 08:00:26 +0200 Subject: [PATCH] mypy: add page (#12847) Co-authored-by: Alejandro Cervera <96702705+tricantivu@users.noreply.github.com> --- pages/common/mypy.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/common/mypy.md diff --git a/pages/common/mypy.md b/pages/common/mypy.md new file mode 100644 index 000000000..9568bec40 --- /dev/null +++ b/pages/common/mypy.md @@ -0,0 +1,36 @@ +# mypy + +> Type check Python code. +> More information: . + +- Type check a specific file: + +`mypy {{path/to/file.py}}` + +- Type check a specific [m]odule: + +`mypy -m {{module_name}}` + +- Type check a specific [p]ackage: + +`mypy -p {{package_name}}` + +- Type check a string of code: + +`mypy -c "{{code}}"` + +- Ignore missing imports: + +`mypy --ignore-missing-imports {{path/to/file_or_directory}}` + +- Show detailed error messages: + +`mypy --show-traceback {{path/to/file_or_directory}}` + +- Specify a custom configuration file: + +`mypy --config-file {{path/to/config_file}}` + +- Display [h]elp: + +`mypy -h`