diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 085ea0f..186ec5a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,8 +23,7 @@ repos: name: pylint entry: poetry run pylint language: system - types: [python] - args: ["--rcfile", "pyproject.toml"] + args: ["--rcfile=pyproject.toml"] exclude: "migrations" - repo: https://github.com/PyCQA/bandit diff --git a/notifications/admin.py b/notifications/admin.py index 0bdba5b..e72395c 100644 --- a/notifications/admin.py +++ b/notifications/admin.py @@ -28,9 +28,9 @@ class NotificationAdmin(admin.ModelAdmin): return qs.prefetch_related("actor") @admin.action(description=gettext_lazy("Mark selected notifications as unread")) - def mark_unread(self, request: HttpRequest, queryset: NotificationQuerySet): + def mark_unread(self, request: HttpRequest, queryset: NotificationQuerySet): # pylint: disable=unused-argument queryset.update(unread=True) @admin.action(description=gettext_lazy("Mark selected notifications as read")) - def mark_read(self, request: HttpRequest, queryset: NotificationQuerySet): + def mark_read(self, request: HttpRequest, queryset: NotificationQuerySet): # pylint: disable=unused-argument queryset.update(unread=False) diff --git a/notifications/models/base.py b/notifications/models/base.py index f98ddf1..fa177f6 100644 --- a/notifications/models/base.py +++ b/notifications/models/base.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -# pylint: disable=too-many-lines import datetime from django.conf import settings diff --git a/notifications/settings.py b/notifications/settings.py index 66065d1..2bf06f9 100644 --- a/notifications/settings.py +++ b/notifications/settings.py @@ -76,7 +76,7 @@ class NotificationSettings: notification_settings = NotificationSettings(NOTIFICATION_DEFAULTS) -def reload_notification_settings(*args: Any, **kwargs: Any): +def reload_notification_settings(*args: Any, **kwargs: Any): # pylint: disable=unused-argument setting = kwargs["setting"] if setting == "DJANGO_NOTIFICATIONS_CONFIG": notification_settings.reload() diff --git a/notifications/templatetags/notifications_tags.py b/notifications/templatetags/notifications_tags.py index b6c9025..be2b392 100644 --- a/notifications/templatetags/notifications_tags.py +++ b/notifications/templatetags/notifications_tags.py @@ -34,7 +34,7 @@ def has_notification(user): # Requires vanilla-js framework - http://vanilla-js.com/ @register.simple_tag def register_notify_callbacks( - badge_class="live_notify_badge", # pylint: disable=too-many-arguments,missing-docstring + badge_class="live_notify_badge", menu_class="live_notify_list", refresh_period=15, callbacks="", diff --git a/pyproject.toml b/pyproject.toml index a790f32..607976e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,6 +118,9 @@ ignore = [ ] jobs = 0 django-settings-module = "notifications.settings" +fail-on=[ + "useless-suppression", +] [tool.pylint.DESIGN] max-locals = 20 @@ -125,6 +128,9 @@ max-args = 10 max-parents = 10 [tool.pylint.'MESSAGES CONTROL'] +enable = [ + "useless-suppression", +] disable = [ "missing-function-docstring", "missing-class-docstring",