diff --git a/.prospector.yaml b/.prospector.yaml index d16c5c2..2a8bfcc 100644 --- a/.prospector.yaml +++ b/.prospector.yaml @@ -9,7 +9,7 @@ ignore-paths: ignore-patterns: - htmlcov/ -pep8: +pycodestyle: enable: # This is the current list of error and warning codes from: # https://github.com/PyCQA/pep8-naming @@ -82,5 +82,7 @@ pep8: pylint: disable: - unused-argument + - raise-missing-from options: max-line-length: 140 + django-settings-module: dummy_settings diff --git a/tg_react/api/accounts/serializers.py b/tg_react/api/accounts/serializers.py index f3dea53..9a4aa40 100644 --- a/tg_react/api/accounts/serializers.py +++ b/tg_react/api/accounts/serializers.py @@ -287,13 +287,10 @@ def validate_uid_and_token_b64(self, uid_and_token_b64): # validate token if not default_token_generator.check_token(self.user, token): - msg = "%s %s" % ( - _( - "This password recovery link has expired or associated user does not exist." - ), - _("Use password recovery form to get new e-mail with new link."), - ) - raise serializers.ValidationError(msg) + msg_0 = _("This password recovery link has expired or associated user does not exist.") + msg_1 = _("Use password recovery form to get new e-mail with new link.") + + raise serializers.ValidationError(f"{msg_0} {msg_1}") class LanguageCodeSerializer(serializers.Serializer): diff --git a/tg_react/settings.py b/tg_react/settings.py index 155361d..de49541 100644 --- a/tg_react/settings.py +++ b/tg_react/settings.py @@ -99,7 +99,7 @@ def configure(): raise ImproperlyConfigured("settings.TGR_PASSWORD_RECOVERY_URL must be str") try: - recovery_url % "TEST" + recovery_url % "TEST" # NOQA except TypeError: raise ImproperlyConfigured( "settings.TGR_PASSWORD_RECOVERY_URL must contain a string " diff --git a/tox.ini b/tox.ini index 4f04452..b95b3c6 100644 --- a/tox.ini +++ b/tox.ini @@ -25,5 +25,5 @@ deps= django32: Django>=3.2,<3.3 django40: Django>=4.0,<4.1 -[testenv:py39-django31] +[testenv:py310-django40] commands = make test-full