From deb69ca69f93e687938ae52013fcedde6f800556 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 19 May 2023 13:45:41 +0200 Subject: [PATCH] main: make ruff default rules happy --- main/management/commands/donor_import.py | 6 +++--- main/utils.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/management/commands/donor_import.py b/main/management/commands/donor_import.py index 5e280843..97eaca2c 100644 --- a/main/management/commands/donor_import.py +++ b/main/management/commands/donor_import.py @@ -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() diff --git a/main/utils.py b/main/utils.py index 63fab407..ccdbd6c9 100644 --- a/main/utils.py +++ b/main/utils.py @@ -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):