From df68456d16617ccc2eb1baeaed6120298b466ab7 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Tue, 26 May 2020 10:17:20 +0200 Subject: [PATCH] F541 f-string is missing placeholders. --- hypha/apply/funds/admin_helpers.py | 2 +- hypha/apply/funds/tests/test_views.py | 2 +- hypha/apply/users/forms.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hypha/apply/funds/admin_helpers.py b/hypha/apply/funds/admin_helpers.py index 8922875cc..7d96bb1a4 100644 --- a/hypha/apply/funds/admin_helpers.py +++ b/hypha/apply/funds/admin_helpers.py @@ -111,7 +111,7 @@ class ApplicationFormButtonHelper(ButtonHelper): ) return { 'classname': classnames, - 'label': f'Copy', + 'label': 'Copy', 'title': f'Copy {form_name}', 'url': self.url_helper.get_action_url('copy_form', admin.utils.quote(pk)), } diff --git a/hypha/apply/funds/tests/test_views.py b/hypha/apply/funds/tests/test_views.py index 46ad7bd97..19a51b30a 100644 --- a/hypha/apply/funds/tests/test_views.py +++ b/hypha/apply/funds/tests/test_views.py @@ -812,7 +812,7 @@ class TestApplicantSubmissionView(BaseSubmissionViewTestCase): def assert_create_review_not_displayed(submission): response = self.get_page(submission) # Ignore whitespace (including line breaks) in button text - pattern = re.compile(rf'\s*Add a review\s*') + pattern = re.compile(r'\s*Add a review\s*') buttons = BeautifulSoup(response.content, 'html5lib').find_all('a', class_='button--primary', text=pattern) self.assertEqual(len(buttons), 0) diff --git a/hypha/apply/users/forms.py b/hypha/apply/users/forms.py index 7b74060d9..55217ae83 100644 --- a/hypha/apply/users/forms.py +++ b/hypha/apply/users/forms.py @@ -12,8 +12,8 @@ class CustomUserAdminFormBase(): super().__init__(*args, **kwargs) # HACK: Wagtail admin doesn't work with custom User models that do not have first/last name. - self.fields['first_name'].widget = forms.HiddenInput(attrs={'value': f"Not used - see full_name"}) - self.fields['last_name'].widget = forms.HiddenInput(attrs={'value': f"Not used - see full_name"}) + self.fields['first_name'].widget = forms.HiddenInput(attrs={'value': 'Not used - see full_name'}) + self.fields['last_name'].widget = forms.HiddenInput(attrs={'value': 'Not used - see full_name'}) class CustomUserEditForm(CustomUserAdminFormBase, UserEditForm): -- GitLab