diff --git a/.pylintrc b/.pylintrc index 099984972..d4d7d62d6 100644 --- a/.pylintrc +++ b/.pylintrc @@ -100,6 +100,7 @@ disable=C0111,missing-docstring, R0912,too-many-branches, R0914,too-many-locals, R0915,too-many-statements, + R0917,too-many-positional-arguments, R1705,no-else-return, R1710,inconsistent-return-statements, R1711,useless-return, diff --git a/requirements-dev.txt b/requirements-dev.txt index f2b7c6b0e..b915739b2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -28,9 +28,12 @@ pytest-server-fixtures pytest-rerunfailures pydocstyle # FIXME: pylint-quotes failing with pylint==3 (https://github.com/edaniszewski/pylint-quotes/issues/29) -pylint>=2.15.4,<3 +# FIXME: use temporary unofficial version working with pylint>3 (https://github.com/edaniszewski/pylint-quotes/pull/30) +# pylint>=2.15.4,<3 +# pylint_quotes +pylint>=3,<4 +pylint_quotes @ git+https://github.com/marekhanus/pylint-quotes.git@0.3.0a2 pylint-per-file-ignores -pylint_quotes responses safety stopit diff --git a/tests/functional/test_docker_app.py b/tests/functional/test_docker_app.py index adbdc72ff..749f23d81 100644 --- a/tests/functional/test_docker_app.py +++ b/tests/functional/test_docker_app.py @@ -243,7 +243,7 @@ def wps_execute(self, version, accept, url=None): status_url = resp.json["location"] job_id = resp.json["jobID"] assert status_url - assert job_id + assert job_id # pylint: disable=E0606 if accept == ContentType.APP_XML: wps_out_url = self.settings["weaver.wps_output_url"] diff --git a/tests/utils.py b/tests/utils.py index b5d4303b3..236693245 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1239,7 +1239,7 @@ def mocked_dismiss_process(): yield # for direct use by context or decorator finally: # used by ExitStack context, which would handle the exception appropriately - return mock_celery_revoke # noqa: B012 # pylint: disable=W0150,lost-exception + return mock_celery_revoke # noqa: B012 # pylint: disable=W0134,W0150,lost-exception def mocked_process_job_runner(job_task_id="mocked-job-id"): diff --git a/tests/wps_restapi/test_colander_extras.py b/tests/wps_restapi/test_colander_extras.py index f902977b3..ec8f2fe0b 100644 --- a/tests/wps_restapi/test_colander_extras.py +++ b/tests/wps_restapi/test_colander_extras.py @@ -4,6 +4,9 @@ Tests for :mod:`weaver.wps_restapi.colander_extras` operations applied on :mod:`weaver.wps_restapi.swagger_definitions` objects. """ + +# pylint: disable=E0241,duplicate-bases + import copy import inspect import json diff --git a/tests/wps_restapi/test_jobs.py b/tests/wps_restapi/test_jobs.py index 726a85480..90d018af8 100644 --- a/tests/wps_restapi/test_jobs.py +++ b/tests/wps_restapi/test_jobs.py @@ -382,7 +382,7 @@ def test_get_jobs_valid_grouping_by_process(self): else: cat = categories["process"] pytest.fail(f"Unknown job grouping 'process' value: {cat}") - self.assert_equal_with_jobs_diffs(grouped_jobs["jobs"], expect) # noqa + self.assert_equal_with_jobs_diffs(grouped_jobs["jobs"], expect) # noqa # pylint: disable=E0606 def template_get_jobs_valid_grouping_by_service_provider(self, service_or_provider): path = get_path_kvp(sd.jobs_service.path, detail="false", groups=service_or_provider) @@ -412,7 +412,7 @@ def template_get_jobs_valid_grouping_by_service_provider(self, service_or_provid else: cat = categories[service_or_provider] pytest.fail(f"Unknown job grouping 'service' value: {cat}") - self.assert_equal_with_jobs_diffs(grouped_jobs["jobs"], expect) # noqa + self.assert_equal_with_jobs_diffs(grouped_jobs["jobs"], expect) # noqa # pylint: disable=E0606 def test_get_jobs_valid_grouping_by_service(self): self.template_get_jobs_valid_grouping_by_service_provider("service") diff --git a/weaver/utils.py b/weaver/utils.py index 9a74ea0bb..7f98b996c 100644 --- a/weaver/utils.py +++ b/weaver/utils.py @@ -3210,8 +3210,7 @@ def _list_refs(_url, _data=None): if not _ref.endswith("/"): yield _ref else: - for _sub_ref in _list_refs(_ref): - yield _sub_ref + yield from _list_refs(_ref) files = list(_list_refs(base_url, html_data)) return fetch_files_url( diff --git a/weaver/wps_restapi/colander_extras.py b/weaver/wps_restapi/colander_extras.py index 83fec8cdd..3ecbe9a02 100644 --- a/weaver/wps_restapi/colander_extras.py +++ b/weaver/wps_restapi/colander_extras.py @@ -51,6 +51,9 @@ of generated OpenAPI model definitions. If not explicitly provided, the value of ``title`` **WILL** default to the name of the schema node class. """ + +# pylint: disable=E0241,duplicate-bases + import copy import inspect import re diff --git a/weaver/wps_restapi/swagger_definitions.py b/weaver/wps_restapi/swagger_definitions.py index df4777b96..1d7fa8fb3 100644 --- a/weaver/wps_restapi/swagger_definitions.py +++ b/weaver/wps_restapi/swagger_definitions.py @@ -12,7 +12,10 @@ The definitions are also employed to generate the `OpenAPI` definitions reported in the documentation published on `Weaver`'s `ReadTheDocs` page. """ + # pylint: disable=C0103,invalid-name +# pylint: disable=E0241,duplicate-bases + import datetime import inspect import os