Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
helllllllder committed Dec 1, 2021
1 parent b30f46a commit 08af2f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions bothub/api/v2/repository/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,13 @@ class ExampleTextHasLimitedWordsValidator(object):
def __call__(self, value):
count = len(value.split())
if count > settings.REPOSITORY_EXAMPLE_TEXT_WORDS_LIMIT:
raise ValidationError(_("Enter a valid value that is in the range of 200 words"))

raise ValidationError(
_(
"Enter a valid value that is in the range of "
+ str(settings.REPOSITORY_EXAMPLE_TEXT_WORDS_LIMIT)
+ " words"
)
)


class APIExceptionCustom(APIException):
Expand Down
2 changes: 1 addition & 1 deletion bothub/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.mail import send_mail
from django.core.validators import RegexValidator, _lazy_re_compile, ProhibitNullCharactersValidator
from django.core.validators import RegexValidator, _lazy_re_compile
from django.db import models
from django.db.models import Sum, Q, IntegerField, Case, When, Count
from django.dispatch import receiver
Expand Down

0 comments on commit 08af2f4

Please sign in to comment.