Skip to content

Commit

Permalink
fix: Bump pre-commit hooks to fix isort issue
Browse files Browse the repository at this point in the history
CI is broken on main due to this isort issue, the root cause lies in an
underlying incompatible change in Poetry. The new version of isort has
dropped support for Python 3.7 so we bump CI to run on 3.11 instead (3.7
is EOL later this year anyway).

PyCQA/isort#2083

With the upgrade to flake8 6, we ran into an issue with comments in the
configuration file. Those comments are moved to their own lines above
the config instead, see issue below.

PyCQA/flake8#1756
  • Loading branch information
aiven-anton committed Jan 30, 2023
1 parent 765ccd9 commit 53b6e7f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
12 changes: 8 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ max-line-length = 125

# E203,W503: incompatibilities with black
# E722: also signaled by pylint (disabling here globally and on case-by-case basis with pylint)
# E501: line length
# E203: whitespace before ':'
# W503: line break before binary operator
# E722: do not use bare 'except'
ignore =
E501, # line length
E203, # whitespace before ':'
W503, # line break before binary operator
E722, # do not use bare 'except'
E501,
E203,
W503,
E722,
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.7
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.11

- name: Install dependencies
run: pip install -r requirements-dev.txt
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
minimum_pre_commit_version: 2.9.2
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: ^vendor/|^tests/.*/fixtures/.*|^tests/integration/test_data/.*
Expand All @@ -11,18 +11,18 @@ repos:
- id: debug-statements

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: isort (python)

- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.12.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 6.0.0
hooks:
- id: flake8

Expand Down

0 comments on commit 53b6e7f

Please sign in to comment.