-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5168133
commit 17ca0e7
Showing
7 changed files
with
140 additions
and
50 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: | ||
|
||
on: push | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Install deps | ||
uses: knowsuchagency/poetry-install@v1 | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Run black check | ||
run: python3 -m black --check . | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: Install deps | ||
uses: knowsuchagency/poetry-install@v1 | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: false | ||
- name: Run flake8 check | ||
run: python3 -m flake8 --count . |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
hooks: | ||
- id: check-ast | ||
- id: trailing-whitespace | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
|
||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v2.1.0 | ||
hooks: | ||
- id: add-trailing-comma | ||
|
||
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
rev: v2.1.0 | ||
hooks: | ||
- id: pretty-format-yaml | ||
args: | ||
- --autofix | ||
- --preserve-quotes | ||
- --indent=2 | ||
|
||
- repo: local | ||
hooks: | ||
- id: autoflake | ||
name: autoflake | ||
entry: poetry run autoflake | ||
language: system | ||
types: [python] | ||
args: [--in-place, --remove-all-unused-imports, --remove-duplicate-keys] | ||
|
||
- id: black | ||
name: Format with Black | ||
entry: poetry run black | ||
language: system | ||
types: [python] | ||
|
||
- id: isort | ||
name: isort | ||
entry: poetry run isort | ||
language: system | ||
types: [python] | ||
|
||
- id: flake8 | ||
name: Check with Flake8 | ||
entry: poetry run flake8 | ||
language: system | ||
pass_filenames: false | ||
types: [python] | ||
args: [--count, .] |
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