Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for mypy to run on entire repo in CI only #453

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 21 additions & 1 deletion linters/mypy/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ lint:
--show-column-numbers ${target}
success_codes: [0, 1]
stdin: false
- name: lint-ci-all
# Run mypy on entire python codebase (ci only) when a python file changes
# allows dependent un-changed files to be checked vs. normal run that only checks changed files
# to enable add command to enabled list like this:
#
# enabled:
# - mypy@1.5.1:
# commands: [lint, lint-ci-all]
#
output: mypy
run:
mypy --ignore-missing-imports --follow-imports=silent --show-error-codes
--show-column-numbers ${workspace}
success_codes: [0, 1]
stdin: false
target: ${root_or_parent_with(ROOT_OF_PYTHON_CODE)}
run_when: [ci]
enabled: false
runtime: python
package: mypy
tools: [mypy]
direct_configs:
- mypy.ini
Expand All @@ -28,7 +48,7 @@ lint:
- setup.cfg
suggest_if: config_present
issue_url_format: https://mypy.readthedocs.io/en/stable/error_code_list.html
known_good_version: 0.931
known_good_version: 1.5.1
version_command:
parse_regex: ${semver}
run: mypy --version