Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ branchProtectionRules:
- 'cla/google'
- 'docs'
- 'lint'
- 'format'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we actually want this one? As far as I know GitHub won't commit the changes back. lint also runs the formatter but will fail if any makes a change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was just being conservative, and assumed that format checked things that lint didn't. So to be clear, we don't need format as a prerelease check at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, so it looks like lint wasn't doing isort, so I integrated isort --check into the lint workflow, so no need for format

- 'mypy'
- 'unit (3.9)'
- 'unit (3.10)'
- 'unit (3.11)'
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/format.yml
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can remove this file now that lint runs both black and isort.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
pull_request:
branches:
- main
name: format
jobs:
format:
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 format
run: |
nox -s format
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