Repository navigation
chore: Add mypy github action #1460
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
Changes from 2 commits
a7d82e2
825f002
86b568e
680c4ae
f07d4d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| on: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we add this here, I think we can safely remove from https://github.com/googleapis/python-bigquery-dataframes/blob/7b0cab5c504ec2b24ea35b29ee32901da65681b6/noxfile.py#L119 which defines the list used in the kokoro presubmit. Or are you waiting to do that cleanup in a subsequent PR (once
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment.
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.
lintalso runs the formatter but will fail if any makes a change.There was a problem hiding this comment.
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
formatas a prerelease check at all?There was a problem hiding this comment.
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
lintwasn't doingisort, so I integratedisort --checkinto the lint workflow, so no need forformat