Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent d49a2f1 commit 0dddffb
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 20 deletions.
1 change: 0 additions & 1 deletion app/blueprints/assessments/forms/comments_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class CommentsForm(FlaskForm):

comment = TextAreaField(
"Comment",
validators=[
Expand Down
1 change: 0 additions & 1 deletion app/blueprints/assessments/models/location_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class LocationData:

@classmethod
def from_json_blob(cls, json_blob):

locations = [
location["location_json_blob"]
for location in json_blob
Expand Down
2 changes: 0 additions & 2 deletions app/blueprints/authentication/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def has_access_to_fund(short_name: str) -> bool:
def check_access_application_id(
func: Callable = None, roles_required: List[str] = []
) -> Callable:

if func is None:
return lambda f: check_access_application_id(
func=f, roles_required=roles_required
Expand Down Expand Up @@ -155,7 +154,6 @@ def _check_access_fund_common(
roles_required: List[str] = [],
fund_key: str = "fund_short_name",
) -> Callable:

if func is None:
return lambda f: _check_access_fund_common(
func=f, roles_required=roles_required, fund_key=fund_key
Expand Down
1 change: 0 additions & 1 deletion app/blueprints/scoring/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ def sub_crit_scoring():
form = ScoreForm()

if form.validate_on_submit():

score = int(form.score.data)
just = form.justification.data

Expand Down
1 change: 0 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def build_govuk_assets(static_dist_root="app/static/dist"):
cwd = os.getcwd()
os.chdir(DIST_PATH)
for css_file in glob.glob("*.css"):

# Read in the file
with open(css_file, "r") as file:
filedata = file.read()
Expand Down
1 change: 0 additions & 1 deletion config/envs/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

@configclass
class DevelopmentConfig(DefaultConfig):

# RSA 256 KEYS
if not hasattr(DefaultConfig, "RSA256_PUBLIC_KEY"):
_test_public_key_path = (
Expand Down
1 change: 0 additions & 1 deletion create_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
def create_app() -> Flask:
flask_app = Flask("Assessment Frontend")
with flask_app.app_context():

init_sentry()
flask_app.config.from_object("config.Config")

Expand Down
1 change: 0 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

@task
def copy_styles(c):

source_path = "./app/static/src/"
dist_path = "./app/static/dist/"

Expand Down
12 changes: 8 additions & 4 deletions tests/test_applicators_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,14 @@ class TestApplicatorsResponseComponentFactory:
"form_name": "funding-required-ns",
"presentation_type": "grouped_fields",
"question": [
"How much revenue are you applying for? 1 April 2023"
" to 31 March 2024",
"How much revenue are you applying for? 1 April 2023"
" to 31 March 2024",
(
"How much revenue are you applying for? 1 April"
" 2023 to 31 March 2024"
),
(
"How much revenue are you applying for? 1 April"
" 2023 to 31 March 2024"
),
],
},
BesideQuestionAnswerPair,
Expand Down
1 change: 0 additions & 1 deletion tests/test_authorisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ def test_resolve_flag_option_shows_for_correct_permissions(
mock_get_associated_tags_for_application,
mocker,
):

token = create_valid_token(user_account)
flask_test_client.set_cookie("localhost", "fsd_user_token", token)
application_id = request.node.get_closest_marker(
Expand Down
1 change: 0 additions & 1 deletion tests/test_data_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class TestDataOperations:

test_app = Flask("app")

def test_get_fund(self, mocker):
Expand Down
6 changes: 4 additions & 2 deletions tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ def mock_list_objects_v2(Bucket, Prefix): # noqa
("awskey123123123123123/sample1.doc", "dummy/path/to/file.dmp"),
(
"filename1.png",
"/assess/application/app_id/export/"
"form_name%252Fpath%252Fname%252Ffilename1.png?short_id=d_id&quoted=True",
(
"/assess/application/app_id/export/"
"form_name%252Fpath%252Fname%252Ffilename1.png?short_id=d_id&quoted=True"
),
),
]
3 changes: 0 additions & 3 deletions tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ def test_change_tags_route(
mock_get_active_tags_for_fund_round,
mock_get_associated_tags_for_application,
):

response = client_with_valid_session.get("/assess/application/app_id/tags")
soup = BeautifulSoup(response.data, "html.parser")
assert soup.find("h1").text == "Change tags"
Expand Down Expand Up @@ -122,7 +121,6 @@ def test_change_tags_route_does_not_show_deactivated_tags_as_options(
mock_get_inactive_tags_for_fund_round,
mock_get_associated_tags_for_application,
):

response = client_with_valid_session.get("/assess/application/app_id/tags")
soup = BeautifulSoup(response.data, "html.parser")
assert soup.find("h1").text == "Change tags"
Expand All @@ -145,7 +143,6 @@ def test_change_tags_route_associated_tag_checked(
mock_get_active_tags_for_fund_round,
mock_get_associated_tags_for_application,
):

response = client_with_valid_session.get("/assess/application/app_id/tags")
soup = BeautifulSoup(response.data, "html.parser")
assert soup.find("h1").text == "Change tags"
Expand Down

0 comments on commit 0dddffb

Please sign in to comment.