main: make ruff default rules happy

This commit is contained in:
Jelle van der Waa 2023-05-19 13:45:41 +02:00
parent 8c5a6854e6
commit deb69ca69f
No known key found for this signature in database
GPG Key ID: C06086337C50773E
2 changed files with 4 additions and 4 deletions

View File

@ -58,14 +58,14 @@ def sanitize_name(self, name):
valid characters and finally trims all excess whitespace"""
# Some submissions contain no alphabetic characters, skip them
if all(not l.isalpha() for l in name):
if all(not l.isalpha() for l in name): # noqa: E741
return u''
# Strip any numbers, they could be a bank account number
name = u''.join([l for l in name if not l.isdigit()])
name = u''.join([l for l in name if not l.isdigit()]) # noqa: E741
# Normalize all capitalized names. (JOHN DOE)
name = u' '.join(l.capitalize() for l in name.split(u' '))
name = u' '.join(l.capitalize() for l in name.split(u' ')) # noqa: E741
# Trim excess spaces
name = name.rstrip().lstrip()

View File

@ -59,7 +59,7 @@ def empty_response():
# utility to make a pair of django choices
make_choice = lambda l: [(str(m), str(m)) for m in l]
make_choice = lambda l: [(str(m), str(m)) for m in l] # noqa E741
def set_created_field(sender, **kwargs):