From 88c68f95f924be355da742d355ad0be0287ac327 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:07:54 +0300 Subject: [PATCH 1/2] MAINT: increase max line length from 79 to 88 There are of course pros and cons, and PEP 8 still recommends 79. However, lots of tools and recommendations have increased max line length: - black and ruff have bumped the limit to 88, - the Linux kernel coding style eventualy bumped the recommended limit from 80 to 100 characters. Also, the current codebase contains > 1880 lines wider than 79, against around 500 lines wider than 88. --- tools/lint_diff.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lint_diff.ini b/tools/lint_diff.ini index dbebe483b4ab..810e265d4dec 100644 --- a/tools/lint_diff.ini +++ b/tools/lint_diff.ini @@ -1,5 +1,5 @@ [pycodestyle] -max_line_length = 79 +max_line_length = 88 statistics = True ignore = E121,E122,E123,E125,E126,E127,E128,E226,E241,E251,E265,E266,E302,E402,E704,E712,E721,E731,E741,W291,W293,W391,W503,W504 exclude = numpy/__config__.py,numpy/typing/tests/data,.spin/cmds.py From d30ca3e997260db0ebdb0c0d15e21229c349ba11 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 1 Sep 2024 14:05:08 +0300 Subject: [PATCH 2/2] MAINT: Bump pycodestyle from 2.8.0 to 2.12.1 --- environment.yml | 2 +- requirements/linter_requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 2a3feb039f82..ba5e9c6225e1 100644 --- a/environment.yml +++ b/environment.yml @@ -42,7 +42,7 @@ dependencies: # NOTE: breathe 4.33.0 collides with sphinx.ext.graphviz - breathe>4.33.0 # For linting - - pycodestyle=2.8.0 + - pycodestyle=2.12.1 - gitpython # Used in some tests - cffi diff --git a/requirements/linter_requirements.txt b/requirements/linter_requirements.txt index 2e0298baed52..c003901cc023 100644 --- a/requirements/linter_requirements.txt +++ b/requirements/linter_requirements.txt @@ -1,2 +1,2 @@ -pycodestyle==2.8.0 +pycodestyle==2.12.1 GitPython>=3.1.30