-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Showing
9 changed files
with
56 additions
and
58 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 |
---|---|---|
|
@@ -3,33 +3,33 @@ name: PyLint | |
on: [push, pull_request] | ||
|
||
jobs: | ||
PEP8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
PEP8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install Python lint libraries | ||
run: | | ||
pip install autoflake isort black | ||
- name: Remove unused imports and variables | ||
run: | | ||
autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports . | ||
- name: lint with isort | ||
run: | | ||
isort . | ||
- name: lint with black | ||
run: | | ||
black --exclude "exampleconfig\.py" . | ||
# commit changes | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'pylint: auto fixes' | ||
commit_options: '--no-verify' | ||
repository: . | ||
commit_user_name: TgCat | ||
commit_user_email: [email protected] | ||
commit_author: TgCat <[email protected]> | ||
- name: Setup Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install Python lint libraries | ||
run: | | ||
pip install autoflake isort black | ||
- name: Remove unused imports and variables | ||
run: | | ||
autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports . | ||
- name: lint with isort | ||
run: | | ||
isort . | ||
- name: lint with black | ||
run: | | ||
black --exclude "exampleconfig\.py" . | ||
# commit changes | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "pylint: auto fixes" | ||
commit_options: "--no-verify" | ||
repository: . | ||
commit_user_name: TgCat | ||
commit_user_email: [email protected] | ||
commit_author: TgCat <[email protected]> |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
[settings] | ||
profile = black | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
force_grid_wrap = 0 | ||
use_parentheses = true | ||
ensure_newline_before_comments = true | ||
line_length = 88 | ||
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER | ||
skip = .tox,__pycache__,*.pyc,venv*/*,reports,venv,env,node_modules,.env,.venv,dist | ||
# General Settings | ||
profile=black | ||
|
||
# Imports | ||
force_sort_within_sections=True | ||
force_to_top=future, __future__ | ||
skip_glob=**/migrations/** | ||
|
||
# Sections | ||
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER |
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,6 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-python.python", | ||
"sourcery.sourcery" | ||
] | ||
} |
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