Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ branchProtectionRules:
- 'cla/google'
- 'docs'
- 'lint'
- 'mypy'
- 'unit (3.9)'
- 'unit (3.10)'
- 'unit (3.11)'
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add this here, I think we can safely remove from

which defines the list used in the kokoro presubmit. Or are you waiting to do that cleanup in a subsequent PR (once mypy is required check, perhaps?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing it (and others) in a following PR: #1459.

pull_request:
branches:
- main
name: mypy
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run mypy
run: |
nox -s mypy
7 changes: 6 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ def lint(session):
Returns a failure if the linters find linting errors or sufficiently
serious code quality issues.
"""
session.install("flake8", BLACK_VERSION)
session.install("flake8", BLACK_VERSION, ISORT_VERSION)
session.run(
"isort",
"--check",
*LINT_PATHS,
)
session.run(
"black",
"--check",
Expand Down