Skip to content

Commit

Permalink
Linter tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jyrno42 committed May 9, 2022
1 parent 1dc9677 commit 9edbba9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -82,5 +82,7 @@ pep8:
pylint:
disable:
- unused-argument
- raise-missing-from
options:
max-line-length: 140
django-settings-module: dummy_settings
11 changes: 4 additions & 7 deletions tg_react/api/accounts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tg_react/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9edbba9

Please sign in to comment.