From c7b7b4ff9bd265d76f30ccb5db43bd7526e9d4ed Mon Sep 17 00:00:00 2001 From: Anika Weinmann <37300249+anikaweinmann@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:12:11 +0200 Subject: [PATCH 1/3] Update linting.yml: update versions --- .github/workflows/linting.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d650530..bb4d02b 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -6,15 +6,15 @@ on: black-version: required: false type: string - default: '23.3.0' + default: '24.4.2' flake8-version: required: false type: string - default: '6.0.0' + default: '7.0.0' pylint-version: required: false type: string - default: '2.17.4' + default: '3.2.2' mdformat-version: required: false type: string From b452d96544b2de004d1bf33db982eb5dbbd765aa Mon Sep 17 00:00:00 2001 From: anikaweinmann Date: Tue, 4 Jun 2024 16:29:58 +0200 Subject: [PATCH 2/3] adjust pylint configs for new pylint version 3.2.2 --- linting-config-examples/.pylintrc | 7 +++++++ linting-config-examples/.pylintrc_allowed_to_fail | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/linting-config-examples/.pylintrc b/linting-config-examples/.pylintrc index 5b4fb12..5ec3244 100644 --- a/linting-config-examples/.pylintrc +++ b/linting-config-examples/.pylintrc @@ -26,6 +26,9 @@ disable= missing-module-docstring, ; we use the GRASS GIS header R, ; refactoring + design recommendations +[BASIC] +# for global variable setting +good-names=keep_data,download_dir,gisdbase,tgtgisrc,tmploc,srcgisrc [BROAD_TRY_CLAUSE] max-try-statements=4 # Default: 1 @@ -35,5 +38,9 @@ max-line-length=80 # Default: 100 max-module-lines=800 # Default: 1000 ignore-long-lines=.*COPYRIGHT:.* |# . description:.*|\s*(# )?.*http.:\/\/\S+?|# %%* +[MESSAGES CONTROL] +# E0606 (possibly-used-before-assignment): to set options and flags at the button of the file +disable=E0606 + [VARIABLES] additional-builtins=_ # Default: () diff --git a/linting-config-examples/.pylintrc_allowed_to_fail b/linting-config-examples/.pylintrc_allowed_to_fail index 43fbe52..589f91d 100644 --- a/linting-config-examples/.pylintrc_allowed_to_fail +++ b/linting-config-examples/.pylintrc_allowed_to_fail @@ -14,6 +14,9 @@ recursive=yes # Default: False # score=no # Default: True +[BASIC] +# for global variable setting +good-names=keep_data,download_dir,gisdbase,tgtgisrc,tmploc,srcgisrc [BROAD_TRY_CLAUSE] max-try-statements=4 # Default: 1 @@ -23,6 +26,10 @@ max-line-length=80 # Default: 100 max-module-lines=800 # Default: 1000 ignore-long-lines=.*COPYRIGHT:.* |# . description:.*|\s*(# )?.*http.:\/\/\S+?|# %%* +[MESSAGES CONTROL] +# E0606 (possibly-used-before-assignment): to set options and flags at the button of the file +disable=E0606 + [VARIABLES] additional-builtins=_ # Default: () From c96e96c15118fd76f80238804f7cf6de9cdbc1e8 Mon Sep 17 00:00:00 2001 From: Anika Weinmann <37300249+anikaweinmann@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:48:33 +0200 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: linakrisztian <106728040+linakrisztian@users.noreply.github.com> --- linting-config-examples/.pylintrc | 2 +- linting-config-examples/.pylintrc_allowed_to_fail | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linting-config-examples/.pylintrc b/linting-config-examples/.pylintrc index 5ec3244..8ce3afd 100644 --- a/linting-config-examples/.pylintrc +++ b/linting-config-examples/.pylintrc @@ -39,7 +39,7 @@ max-module-lines=800 # Default: 1000 ignore-long-lines=.*COPYRIGHT:.* |# . description:.*|\s*(# )?.*http.:\/\/\S+?|# %%* [MESSAGES CONTROL] -# E0606 (possibly-used-before-assignment): to set options and flags at the button of the file +# E0606 (possibly-used-before-assignment): to set options and flags at the bottom of the file without pre-initialization disable=E0606 [VARIABLES] diff --git a/linting-config-examples/.pylintrc_allowed_to_fail b/linting-config-examples/.pylintrc_allowed_to_fail index 589f91d..e00ddf0 100644 --- a/linting-config-examples/.pylintrc_allowed_to_fail +++ b/linting-config-examples/.pylintrc_allowed_to_fail @@ -27,7 +27,7 @@ max-module-lines=800 # Default: 1000 ignore-long-lines=.*COPYRIGHT:.* |# . description:.*|\s*(# )?.*http.:\/\/\S+?|# %%* [MESSAGES CONTROL] -# E0606 (possibly-used-before-assignment): to set options and flags at the button of the file +# E0606 (possibly-used-before-assignment): to set options and flags at the bottom of the file without pre-initialization disable=E0606 [VARIABLES]