Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Commit d7f3699

Browse files
committed
Remove line length ignores from flake8
These line length ignore rules were added to accommodate `pyre-ignore` comments. They are no longer needed and are being removed. Fortunately there was only one line of code that ended up being flagged for being too long. It's being refactored to account for the (once again) enforced limit.
1 parent 4979da0 commit d7f3699

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

.flake8

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,4 @@ max-line-length = 80
55
max-complexity = 18
66
per-file-ignores =
77
src/awards/settings/dev.py: F405
8-
# TODO: Remove these once
9-
# https://github.com/facebook/pyre-check/pull/256,
10-
# https://github.com/facebook/pyre-check/pull/260,
11-
# https://github.com/facebook/pyre-check/pull/261, and
12-
# https://github.com/facebook/pyre-check/pull/262 can be used.
13-
src/applications/forms.py: B950
14-
src/applications/migrations/0003_auto_20200507_0125.py: B950
15-
src/applications/models.py: B950
16-
src/applications/test_views.py: B950
17-
src/awards/urls.py: B950
18-
src/homepage/test_views.py: B950
19-
src/users/migrations/0001_initial.py: B950
20-
src/users/forms.py: B950
21-
src/users/models.py: B950
22-
src/users/views.py: B950
238
select = B,C,E,F,W,T4,B9

src/applications/forms.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,10 @@ def clean(self) -> Dict[str, Any]:
5959
}
6060
)
6161
elif travel_amount:
62-
raise forms.ValidationError(
63-
{
64-
"travel_requested": _(
65-
"You must request travel assistance before providing an estimated cost."
66-
)
67-
}
62+
msg = _(
63+
"You must request travel assistance before providing an estimated cost."
6864
)
65+
raise forms.ValidationError({"travel_requested": msg})
6966

7067
return cleaned_data
7168

0 commit comments

Comments
 (0)