-
Notifications
You must be signed in to change notification settings - Fork 88
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
3 changed files
with
67 additions
and
0 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,30 @@ | ||
[flake8] | ||
exclude = */migrations | ||
extend-ignore = | ||
# "Celery tasks should have explicit names." isn't very well implemented at this time (4/19/2020) | ||
PIE783 | ||
# False positive in flake8-pie 0.7 (2021-04-15) | ||
PIE795 | ||
PIE798 | ||
PIE803 | ||
# Print found | ||
T201 | ||
|
||
# Logging statement uses string.format() | ||
G001 | ||
# Logging statement uses '%' | ||
G002 | ||
# Logging statement uses '+' | ||
G003 | ||
# Logging statement uses f-string (Same as PIE803) | ||
G004 | ||
|
||
# This is used by flake8-import-order | ||
import-order-style = pycharm | ||
application-import-names = accounts, apiv2, bookmarks, clustering, comments, donations, favorites, follow, forum, freesound, general, geotags, messages, monitor, ratings, search, similarity, sounds, support, tags, tickets, utils, wiki | ||
# This is used by flake8-requirements | ||
known-modules = | ||
max-line-length = 170 | ||
|
||
# This is used by flake8-annotations so that we don't have to explicitly type None in functions that don't use it | ||
suppress-none-returning = true |
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,22 @@ | ||
name: Flake8 | ||
# https://gitlab.com/pycqa/flake8 | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- name: Lint with flake8 | ||
run: | | ||
pip -q install -r requirements.linters.txt | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# These are just the style issues | ||
flake8 . --count --statistics |
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,15 @@ | ||
dlint | ||
flake8 | ||
flake8-bandit | ||
flake8-bugbear | ||
flake8-builtins | ||
flake8-debugger | ||
flake8-django | ||
flake8-eradicate | ||
flake8-import-order | ||
flake8-logging-format | ||
flake8-mutable | ||
flake8-pie | ||
flake8-print | ||
flake8-requirements | ||
flake8-use-fstring |