From ef0e3687411902109f2b3965bc26c4626ab78fb2 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Tue, 22 Mar 2022 11:25:13 -0300 Subject: [PATCH 1/3] pylint: Ignore consider-using-f-string. Newer versions of pylint warns about not using f-strings, but those are not supported in Python 2, which ansible-freeipa still need to support. --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 7cae17b6..6c4f672c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,6 +34,7 @@ ignore = D1,D212,D203 [pylint.MASTER] disable = + consider-using-f-string, # f-string is not supported on Python2 unspecified-encoding, # open() does not provide `encoding` in Python2 use-maxsplit-arg, redundant-u-string-prefix, From 461bd8b15bea25340eb70be41a68a03d56c2588a Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Tue, 22 Mar 2022 12:02:12 -0300 Subject: [PATCH 2/3] pylint: Ignore global-variable-not-assigned --- roles/ipaclient/module_utils/ansible_ipa_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ipaclient/module_utils/ansible_ipa_client.py b/roles/ipaclient/module_utils/ansible_ipa_client.py index 8826b6d4..0523ebb2 100644 --- a/roles/ipaclient/module_utils/ansible_ipa_client.py +++ b/roles/ipaclient/module_utils/ansible_ipa_client.py @@ -207,7 +207,7 @@ else: cli_realm, cli_domain, cli_server, cli_kdc, dnsok, filename, client_domain, client_hostname, force=False, configure_sssd=True): - # pylint: disable=global-statement + # pylint: disable=global-variable-not-assigned global options options.force = force options.sssd = configure_sssd From 68661d692219b9b00ca3957f7def36a074048ab1 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Tue, 22 Mar 2022 11:27:06 -0300 Subject: [PATCH 3/3] pylint: Bump version to 2.12.2. Update pylint version to the latest supported by Fedora 36. --- .github/workflows/lint.yml | 2 +- .pre-commit-config.yaml | 2 +- requirements-dev.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0003acfc..748bfcd3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -68,7 +68,7 @@ jobs: python-version: "3.x" - name: Run pylint run: | - pip install pylint==2.10.2 + pip install pylint==2.12.2 pylint plugins roles --disable=import-error shellcheck: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48582c8a..ac4b3d13 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: hooks: - id: pydocstyle - repo: https://github.com/pycqa/pylint - rev: v2.10.2 + rev: v2.12.2 hooks: - id: pylint args: diff --git a/requirements-dev.txt b/requirements-dev.txt index b1e4d0a7..4ce8ea8a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,4 @@ ipdb pre-commit flake8-bugbear -pylint==2.10.2 +pylint==2.12.2