Skip to content

Commit d762bce

Browse files
authored
Use latest flake8 and add pre-commit config (#180)
* Use latest flake8 and add pre-commit config * Update version of Python used for github action to 3.9
1 parent 90d9f97 commit d762bce

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

.github/workflows/python-app.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v2
19-
- name: Set up Python 3.7
19+
- name: Set up Python 3.9
2020
uses: actions/setup-python@v2
2121
with:
22-
python-version: 3.7
22+
python-version: 3.9
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/PyCQA/flake8
3+
rev: 6.0.0
4+
hooks:
5+
- id: flake8
6+
additional_dependencies: [
7+
'flake8-bugbear>=22.10.27',
8+
'flake8-comprehensions>=3.10',
9+
'flake8-debugger',
10+
'flake8-docstrings>=1.6.0',
11+
'flake8-isort>=5.0',
12+
'flake8-pylint',
13+
'flake8-rst-docstrings',
14+
'flake8-string-format'
15+
]

requirements-test.txt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
flake8
2-
flake8-broken-line
3-
flake8-bugbear
4-
flake8-commas
5-
flake8-comprehensions
1+
flake8>=6.0.0
2+
flake8-bugbear>=22.10.27
3+
flake8-comprehensions>=3.10
64
flake8-debugger
7-
flake8-docstrings
8-
flake8-eradicate
9-
flake8-isort
10-
flake8-isort
5+
flake8-docstrings>=1.6.0
6+
flake8-isort>=5.0
117
flake8-pylint
12-
flake8-quotes
138
flake8-rst-docstrings
149
flake8-string-format
1510
gpiozero

0 commit comments

Comments
 (0)