-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: speed up linting and autoformatting. fix lints
- Loading branch information
1 parent
460add1
commit e0852be
Showing
73 changed files
with
402 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,35 +9,42 @@ jobs: | |
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
cache: pip | ||
cache-dependency-path: requirements-dev.txt | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --disable-pip-version-check wheel pip-tools | ||
pip-sync requirements-dev.txt | ||
python -m pip install --disable-pip-version-check --no-deps . | ||
- name: Lint | ||
run: | | ||
echo "::add-matcher::.github/pylama_matcher.json" | ||
pylama --options tox.ini | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: 3.9 | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements-dev.txt') }}-lint | ||
- name: Install Ruff | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: grep -E 'ruff==' requirements-dev.txt | xargs pip install | ||
- name: Lint | ||
run: | | ||
echo "::add-matcher::.github/pylama_matcher.json" | ||
ruff --config tests/ruff.toml . | ||
autoformat: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --disable-pip-version-check black==23.1.0 isort==5.12.0 | ||
- name: Autoformatter | ||
run: | | ||
black --diff . | ||
isort --atomic --profile black --check-only . | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: 3.9 | ||
- name: Cache dependencies | ||
uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements-dev.txt') }}-autoformat | ||
- name: Install Black | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: grep -E 'black==' requirements-dev.txt | xargs pip install | ||
- name: Lint | ||
run: | | ||
black --diff --fast . | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,4 +92,4 @@ def model_list_cmd(): | |
|
||
|
||
if __name__ == "__main__": | ||
aimg() # noqa | ||
aimg() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.