diff --git a/integreat_cms/integreat-cms-cli b/integreat_cms/integreat-cms-cli index 43b75059bd..d15471237b 100755 --- a/integreat_cms/integreat-cms-cli +++ b/integreat_cms/integreat-cms-cli @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# pylint: disable=invalid-name """ Django's command-line utility for administrative tasks. """ import configparser import os diff --git a/pyproject.toml b/pyproject.toml index 331596bcf8..371362c866 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,7 @@ dev = [ "pyjwt", "pylint", "pylint-django", + "pylint-per-file-ignores", "pytest-circleci-parallelized", "pytest-cov", "pytest-django", @@ -251,6 +252,7 @@ dev-pinned = [ "PyJWT==2.6.0", "pylint==2.17.2", "pylint-django==2.5.3", + "pylint-per-file-ignores==1.2.0", "pylint-plugin-utils==0.7", "pyproject_hooks==1.0.0", "pytest==7.2.2", @@ -340,6 +342,7 @@ order_by_type = false jobs = 0 load-plugins = [ "pylint_django", + "pylint_per_file_ignores", "pylint.extensions.code_style", "pylint.extensions.comparetozero", "pylint.extensions.comparison_placement", @@ -387,3 +390,6 @@ enable = [ [tool.pylint.reports] output-format = "colorized" + +[tool.pylint-per-file-ignores] +"/tests/"="unused-argument,missing-function-docstring" diff --git a/tests/api/test_api_feedback.py b/tests/api/test_api_feedback.py index f1e3c9b9a4..5a3289affa 100644 --- a/tests/api/test_api_feedback.py +++ b/tests/api/test_api_feedback.py @@ -34,7 +34,6 @@ } -# pylint: disable=unused-argument @pytest.mark.django_db @pytest.mark.parametrize("view_name,post_data", API_FEEDBACK_VIEWS) def test_api_feedback_success(load_test_data, view_name, post_data): @@ -82,7 +81,6 @@ def test_api_feedback_success(load_test_data, view_name, post_data): assert feedback.region_id == 1 -# pylint: disable=unused-argument @pytest.mark.django_db @pytest.mark.parametrize( "view_name,kwargs,post_data,response_data", API_FEEDBACK_ERRORS @@ -118,7 +116,6 @@ def test_api_feedback_errors( assert not Feedback.objects.exists() -# pylint: disable=unused-argument @pytest.mark.django_db def test_api_feedback_invalid_method(load_test_data): """ diff --git a/tests/api/test_api_push_page.py b/tests/api/test_api_push_page.py index 5904d0358c..165109558f 100644 --- a/tests/api/test_api_push_page.py +++ b/tests/api/test_api_push_page.py @@ -5,7 +5,6 @@ from integreat_cms.cms.models import Page -# pylint: disable=unused-argument @pytest.mark.django_db def test_api_push_page_content(load_test_data): """ diff --git a/tests/api/test_api_result.py b/tests/api/test_api_result.py index a995a31427..2b571d983b 100644 --- a/tests/api/test_api_result.py +++ b/tests/api/test_api_result.py @@ -6,7 +6,6 @@ from .api_config import API_ENDPOINTS -# pylint: disable=unused-argument @pytest.mark.django_db @pytest.mark.parametrize( "endpoint,wp_endpoint,expected_result,expected_code,expected_queries", API_ENDPOINTS diff --git a/tests/cms/models/events/test_recurrence_rule.py b/tests/cms/models/events/test_recurrence_rule.py index bc657f8851..276352a716 100644 --- a/tests/cms/models/events/test_recurrence_rule.py +++ b/tests/cms/models/events/test_recurrence_rule.py @@ -8,7 +8,6 @@ from integreat_cms.cms.models import Event, RecurrenceRule -# pylint: disable=missing-function-docstring class TestCreatingIcalRule: """ Test whether to_ical_rrule_string function is calculating the rrule correctly diff --git a/tests/cms/test_duplicate_regions.py b/tests/cms/test_duplicate_regions.py index 76730c655d..4c47d99101 100644 --- a/tests/cms/test_duplicate_regions.py +++ b/tests/cms/test_duplicate_regions.py @@ -9,7 +9,7 @@ from integreat_cms.cms.utils.linkcheck_utils import get_url_count -# pylint: disable=unused-argument,too-many-locals +# pylint: disable=too-many-locals @pytest.mark.order("last") @pytest.mark.django_db(transaction=True, serialized_rollback=True) def test_duplicate_regions(load_test_data_transactional, admin_client): diff --git a/tests/cms/test_login.py b/tests/cms/test_login.py index 3e4590a9d3..872bc2f963 100644 --- a/tests/cms/test_login.py +++ b/tests/cms/test_login.py @@ -3,7 +3,6 @@ from django.urls import reverse -# pylint: disable=unused-argument @pytest.mark.django_db @pytest.mark.parametrize( "username", ["root", "root@root.root", "management", "management@example.com"] @@ -46,7 +45,6 @@ def test_login_success(load_test_data, client, settings, username): ) -# pylint: disable=unused-argument @pytest.mark.django_db @pytest.mark.parametrize( "username", diff --git a/tests/cms/test_page_filters.py b/tests/cms/test_page_filters.py index b07333ab4b..52492de6f4 100644 --- a/tests/cms/test_page_filters.py +++ b/tests/cms/test_page_filters.py @@ -4,7 +4,6 @@ from django.urls import reverse -# pylint: disable=unused-argument @pytest.mark.django_db def test_page_filters(load_test_data, admin_client): """ diff --git a/tests/cms/views/status_code/test_view_status_code_1.py b/tests/cms/views/status_code/test_view_status_code_1.py index 89e811287b..40436a4744 100644 --- a/tests/cms/views/status_code/test_view_status_code_1.py +++ b/tests/cms/views/status_code/test_view_status_code_1.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[1::16]) def test_view_status_code_1(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_10.py b/tests/cms/views/status_code/test_view_status_code_10.py index b9611823c1..9798c683ba 100644 --- a/tests/cms/views/status_code/test_view_status_code_10.py +++ b/tests/cms/views/status_code/test_view_status_code_10.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[10::16]) def test_view_status_code_10(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_11.py b/tests/cms/views/status_code/test_view_status_code_11.py index d32cc043d2..ebd7ae9068 100644 --- a/tests/cms/views/status_code/test_view_status_code_11.py +++ b/tests/cms/views/status_code/test_view_status_code_11.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[11::16]) def test_view_status_code_11(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_12.py b/tests/cms/views/status_code/test_view_status_code_12.py index daaa7615dc..2550fd2760 100644 --- a/tests/cms/views/status_code/test_view_status_code_12.py +++ b/tests/cms/views/status_code/test_view_status_code_12.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[12::16]) def test_view_status_code_12(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_13.py b/tests/cms/views/status_code/test_view_status_code_13.py index 892b21b080..7170e4db92 100644 --- a/tests/cms/views/status_code/test_view_status_code_13.py +++ b/tests/cms/views/status_code/test_view_status_code_13.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[13::16]) def test_view_status_code_13(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_14.py b/tests/cms/views/status_code/test_view_status_code_14.py index f07a83b445..9300bb8217 100644 --- a/tests/cms/views/status_code/test_view_status_code_14.py +++ b/tests/cms/views/status_code/test_view_status_code_14.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[14::16]) def test_view_status_code_14(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_15.py b/tests/cms/views/status_code/test_view_status_code_15.py index 1e3deeea5a..24f8cde5b2 100644 --- a/tests/cms/views/status_code/test_view_status_code_15.py +++ b/tests/cms/views/status_code/test_view_status_code_15.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[15::16]) def test_view_status_code_15(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_16.py b/tests/cms/views/status_code/test_view_status_code_16.py index bafd4d10f7..0b9d5e6dae 100644 --- a/tests/cms/views/status_code/test_view_status_code_16.py +++ b/tests/cms/views/status_code/test_view_status_code_16.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[0::16]) def test_view_status_code_16(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_2.py b/tests/cms/views/status_code/test_view_status_code_2.py index 420ef86231..b20874bd49 100644 --- a/tests/cms/views/status_code/test_view_status_code_2.py +++ b/tests/cms/views/status_code/test_view_status_code_2.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[2::16]) def test_view_status_code_2(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_3.py b/tests/cms/views/status_code/test_view_status_code_3.py index 44d1a395f1..53a1d4d468 100644 --- a/tests/cms/views/status_code/test_view_status_code_3.py +++ b/tests/cms/views/status_code/test_view_status_code_3.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[3::16]) def test_view_status_code_3(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_4.py b/tests/cms/views/status_code/test_view_status_code_4.py index da1c0d8dc2..7398de8b50 100644 --- a/tests/cms/views/status_code/test_view_status_code_4.py +++ b/tests/cms/views/status_code/test_view_status_code_4.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[4::16]) def test_view_status_code_4(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_5.py b/tests/cms/views/status_code/test_view_status_code_5.py index f638e6c244..41728c2986 100644 --- a/tests/cms/views/status_code/test_view_status_code_5.py +++ b/tests/cms/views/status_code/test_view_status_code_5.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[5::16]) def test_view_status_code_5(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_6.py b/tests/cms/views/status_code/test_view_status_code_6.py index 99496fb0e0..793ecaae5b 100644 --- a/tests/cms/views/status_code/test_view_status_code_6.py +++ b/tests/cms/views/status_code/test_view_status_code_6.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[6::16]) def test_view_status_code_6(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_7.py b/tests/cms/views/status_code/test_view_status_code_7.py index a146491085..a98e5978b8 100644 --- a/tests/cms/views/status_code/test_view_status_code_7.py +++ b/tests/cms/views/status_code/test_view_status_code_7.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[7::16]) def test_view_status_code_7(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_8.py b/tests/cms/views/status_code/test_view_status_code_8.py index c197bbccb1..e043091141 100644 --- a/tests/cms/views/status_code/test_view_status_code_8.py +++ b/tests/cms/views/status_code/test_view_status_code_8.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[8::16]) def test_view_status_code_8(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/status_code/test_view_status_code_9.py b/tests/cms/views/status_code/test_view_status_code_9.py index c44260adf4..857e4a0877 100644 --- a/tests/cms/views/status_code/test_view_status_code_9.py +++ b/tests/cms/views/status_code/test_view_status_code_9.py @@ -4,7 +4,6 @@ from ..view_config import PARAMETRIZED_VIEWS -# pylint: disable=missing-function-docstring @pytest.mark.django_db @pytest.mark.parametrize("view_name,kwargs,post_data,roles", PARAMETRIZED_VIEWS[9::16]) def test_view_status_code_9(login_role_user, view_name, kwargs, post_data, roles): diff --git a/tests/cms/views/test_public_view_status_code.py b/tests/cms/views/test_public_view_status_code.py index 610ec374ab..b83de04e90 100644 --- a/tests/cms/views/test_public_view_status_code.py +++ b/tests/cms/views/test_public_view_status_code.py @@ -5,7 +5,6 @@ from .view_config import PARAMETRIZED_PUBLIC_VIEWS -# pylint: disable=unused-argument @pytest.mark.django_db @pytest.mark.parametrize("view_name,post_data", PARAMETRIZED_PUBLIC_VIEWS) def test_public_view_status_code(load_test_data, view_name, post_data): diff --git a/tests/conftest.py b/tests/conftest.py index 9d5e962218..e9cf39d523 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -42,7 +42,6 @@ pytest_plugins = "aiohttp.pytest_plugin" -# pylint: disable=unused-argument @pytest.fixture(scope="session") def load_test_data(django_db_setup, django_db_blocker): """ @@ -58,7 +57,6 @@ def load_test_data(django_db_setup, django_db_blocker): call_command("loaddata", "integreat_cms/cms/fixtures/test_data.json") -# pylint: disable=unused-argument @pytest.fixture(scope="function") def load_test_data_transactional(transactional_db, django_db_blocker): """ @@ -75,7 +73,7 @@ def load_test_data_transactional(transactional_db, django_db_blocker): call_command("loaddata", "integreat_cms/cms/fixtures/test_data.json") -# pylint: disable=unused-argument,redefined-outer-name +# pylint: disable=redefined-outer-name @pytest.fixture(scope="session", params=ALL_ROLES) def login_role_user(request, load_test_data, django_db_blocker): """ @@ -102,7 +100,7 @@ def login_role_user(request, load_test_data, django_db_blocker): return client, request.param -# pylint: disable=unused-argument,redefined-outer-name +# pylint: disable=redefined-outer-name @pytest.fixture(scope="session", params=ALL_ROLES) def login_role_user_async(request, load_test_data, django_db_blocker): """ diff --git a/tests/core/management/commands/test_duplicate_pages.py b/tests/core/management/commands/test_duplicate_pages.py index d561bbb046..9738ea3cf7 100644 --- a/tests/core/management/commands/test_duplicate_pages.py +++ b/tests/core/management/commands/test_duplicate_pages.py @@ -39,7 +39,6 @@ def test_duplicate_pages_non_existing_region(settings): assert str(exc_info.value) == 'Region with slug "non-existing" does not exist.' -# pylint: disable=unused-argument @pytest.mark.django_db def test_duplicate_pages(settings, load_test_data): """ diff --git a/tests/core/management/commands/test_find_missing_versions.py b/tests/core/management/commands/test_find_missing_versions.py index 9c082dee9e..e8875e6540 100644 --- a/tests/core/management/commands/test_find_missing_versions.py +++ b/tests/core/management/commands/test_find_missing_versions.py @@ -27,7 +27,6 @@ def test_find_missing_versions_invalid_model(): ) -# pylint: disable=unused-argument @pytest.mark.django_db @pytest.mark.parametrize("model", ["page", "event", "poi"]) def test_find_missing_versions_success(load_test_data, model): @@ -39,7 +38,6 @@ def test_find_missing_versions_success(load_test_data, model): assert not err -# pylint: disable=unused-argument @pytest.mark.django_db def test_find_missing_versions_failure(load_test_data): """ diff --git a/tests/core/management/commands/test_replace_links.py b/tests/core/management/commands/test_replace_links.py index 2125bac551..0464ad12ab 100644 --- a/tests/core/management/commands/test_replace_links.py +++ b/tests/core/management/commands/test_replace_links.py @@ -27,7 +27,6 @@ def test_replace_links_missing_replace(): assert str(exc_info.value) == "Error: the following arguments are required: replace" -# pylint: disable=unused-argument @pytest.mark.django_db def test_replace_links_non_existing_region(load_test_data): """ @@ -45,7 +44,6 @@ def test_replace_links_non_existing_region(load_test_data): assert str(exc_info.value) == 'Region with slug "non-existing" does not exist.' -# pylint: disable=unused-argument @pytest.mark.django_db def test_replace_links_non_existing_username(load_test_data): """ @@ -63,7 +61,6 @@ def test_replace_links_non_existing_username(load_test_data): assert str(exc_info.value) == 'User with username "non-existing" does not exist.' -# pylint: disable=unused-argument @pytest.mark.order("last") @pytest.mark.django_db(transaction=True, serialized_rollback=True) def test_replace_links_dry_run(load_test_data_transactional): @@ -111,7 +108,6 @@ def test_replace_links_dry_run(load_test_data_transactional): ).exists(), "Replaced link should not be created during dry run" -# pylint: disable=unused-argument @pytest.mark.order("last") @pytest.mark.django_db(transaction=True, serialized_rollback=True) def test_replace_links_commit(load_test_data_transactional): diff --git a/tests/core/management/commands/test_reset_deepl_budget.py b/tests/core/management/commands/test_reset_deepl_budget.py index c621a80148..6d10649a6b 100644 --- a/tests/core/management/commands/test_reset_deepl_budget.py +++ b/tests/core/management/commands/test_reset_deepl_budget.py @@ -40,7 +40,6 @@ def test_not_first_day(): ) -# pylint: disable=unused-argument @pytest.mark.order("last") @pytest.mark.django_db(transaction=True, serialized_rollback=True) def test_reset_deepl_budget(load_test_data_transactional): diff --git a/tests/core/management/commands/test_summ_ai_bulk.py b/tests/core/management/commands/test_summ_ai_bulk.py index 9b28a80a9d..7664409e6d 100644 --- a/tests/core/management/commands/test_summ_ai_bulk.py +++ b/tests/core/management/commands/test_summ_ai_bulk.py @@ -29,7 +29,6 @@ def test_summ_ai_bulk_missing_username(): ) -# pylint: disable=unused-argument @pytest.mark.django_db def test_summ_ai_bulk_disabled(settings, load_test_data): """ @@ -51,7 +50,7 @@ def test_summ_ai_bulk_non_existing_region(): assert str(exc_info.value) == 'Region with slug "non-existing" does not exist.' -# pylint: disable=unused-argument,fixme +# pylint: disable=fixme @pytest.mark.django_db def test_summ_ai_bulk_disabled_region(load_test_data): """ @@ -64,7 +63,6 @@ def test_summ_ai_bulk_disabled_region(load_test_data): # assert str(exc_info.value) == 'SUMM.AI API is disabled in "Stadt Augsburg".' -# pylint: disable=unused-argument @pytest.mark.django_db def test_summ_ai_bulk_non_existing_username(load_test_data): """ diff --git a/tests/firebase_api/test_firebase_api_client.py b/tests/firebase_api/test_firebase_api_client.py index 20620ac23c..cf0448e344 100644 --- a/tests/firebase_api/test_firebase_api_client.py +++ b/tests/firebase_api/test_firebase_api_client.py @@ -24,7 +24,6 @@ class TestFirebaseApiClient: "404": {"reason": "", "status_code": 404}, } - # pylint: disable=unused-argument @pytest.mark.django_db def test_client_throws_exception_when_fcm_disabled(self, settings, load_test_data): """ @@ -41,7 +40,6 @@ def test_client_throws_exception_when_fcm_disabled(self, settings, load_test_dat with pytest.raises(ImproperlyConfigured): FirebaseApiClient(notification) - # pylint: disable=unused-argument @pytest.mark.django_db def test_is_valid(self, settings, load_test_data): """ @@ -58,7 +56,6 @@ def test_is_valid(self, settings, load_test_data): notification = PushNotification.objects.first() assert FirebaseApiClient(notification).is_valid() - # pylint: disable=unused-argument @pytest.mark.django_db def test_is_invalid_when_no_translation(self, settings, load_test_data): """ @@ -77,7 +74,6 @@ def test_is_invalid_when_no_translation(self, settings, load_test_data): pns.prepared_pnts = [] assert not pns.is_valid() - # pylint: disable=unused-argument @pytest.mark.django_db def test_is_invalid_when_no_title(self, settings, load_test_data): """ @@ -96,7 +92,6 @@ def test_is_invalid_when_no_title(self, settings, load_test_data): pns.prepared_pnts[0].title = "" assert not pns.is_valid() - # pylint: disable=unused-argument @pytest.mark.django_db def test_firebase_api_200_success( self, settings, load_test_data, requests_mock, caplog @@ -123,7 +118,6 @@ def test_firebase_api_200_success( assert "sent, FCM id: 1" in record.message assert status - # pylint: disable=unused-argument @pytest.mark.django_db def test_firebase_api_200_unexpected_api_response( self, settings, load_test_data, requests_mock, caplog @@ -151,7 +145,6 @@ def test_firebase_api_200_unexpected_api_response( assert "sent, but unexpected API response" in record.message assert status - # pylint: disable=unused-argument @pytest.mark.django_db def test_firebase_api_403_wrong_token( self, settings, load_test_data, requests_mock, caplog @@ -179,7 +172,6 @@ def test_firebase_api_403_wrong_token( assert "Received invalid response from FCM for" in record.message assert not status - # pylint: disable=unused-argument @pytest.mark.django_db def test_firebase_api_404(self, settings, load_test_data, requests_mock, caplog): """ diff --git a/tests/pdf/test_pdf_export.py b/tests/pdf/test_pdf_export.py index 1929f00dc8..8d81bd3b87 100644 --- a/tests/pdf/test_pdf_export.py +++ b/tests/pdf/test_pdf_export.py @@ -6,7 +6,7 @@ from django.urls import reverse -# pylint: disable=unused-argument,too-many-locals +# pylint: disable=too-many-locals @pytest.mark.django_db # Override urls to serve PDF files @pytest.mark.urls("tests.pdf.dummy_django_app.static_urls") diff --git a/tools/pylint.sh b/tools/pylint.sh index 1dc3f866fd..cf9a0dc992 100755 --- a/tools/pylint.sh +++ b/tools/pylint.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script can be used to run the pylint_runner while ignoring migrations. +# This script can be used to run pylint # Import utility functions # shellcheck source=./tools/_functions.sh @@ -10,5 +10,6 @@ require_installed # Run pylint echo "Starting code linting with pylint..." | print_info -pylint . +# Explicitly include cli which does not have a .py ending +pylint . integreat_cms/integreat-cms-cli echo "✔ Linting finished" | print_success