From f0e6d0c89fcca7437a6399ac5da1e12e722544ea Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 2 Apr 2025 11:55:19 -0300 Subject: [PATCH 1/3] pre-commit: Bump flake8 version to 7.2.0 Bump pre-commit version to the latest available. Signed-off-by: Rafael Guterres Jeffman --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 248374ca..8e879c71 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - id: yamllint files: \.(yaml|yml)$ - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 + rev: 7.2.0 hooks: - id: flake8 - repo: https://github.com/pycqa/pylint From 678927f35cfd7c167f7a72236ff42abcb94c3ac0 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 2 Apr 2025 11:56:47 -0300 Subject: [PATCH 2/3] Unpin flake8 version from requirements-dev.txt Upstream flake8 lint test is executed with the latest available version in pip, but the requirements-dev.txt had a pinned version, making flake8 error to be found too late. Signed-off-by: Rafael Guterres Jeffman --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5a347cb6..a53e5b9c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ -r requirements-tests.txt ipdb==0.13.4 pre-commit==2.20.0 -flake8==7.0.0 +flake8 flake8-bugbear pylint>=3.2 wrapt==1.14.1 From 40d85f83e43b83956109d21dbfae7f1402b991da Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 2 Apr 2025 11:59:30 -0300 Subject: [PATCH 3/3] Fix linter issues related to 'global' This patch fixes an issue reported by flake8 7.2.0 and enables a pylint test that was disable, both related to the use of 'global'. Signed-off-by: Rafael Guterres Jeffman --- roles/ipaclient/module_utils/ansible_ipa_client.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/roles/ipaclient/module_utils/ansible_ipa_client.py b/roles/ipaclient/module_utils/ansible_ipa_client.py index 596ddfba..1a3a974e 100644 --- a/roles/ipaclient/module_utils/ansible_ipa_client.py +++ b/roles/ipaclient/module_utils/ansible_ipa_client.py @@ -231,8 +231,6 @@ try: cli_realm, cli_domain, cli_server, cli_kdc, dnsok, filename, client_domain, client_hostname, force=False, configure_sssd=True): - # pylint: disable=global-variable-not-assigned - global options options.force = force options.sssd = configure_sssd return ipa_client_install.configure_krb5_conf(