Skip to content

Commit

Permalink
chore: noqa false flags from flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
marksweb committed Apr 21, 2024
1 parent caee720 commit df94ce3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/flickr_api_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_photo_files(photo_list):
for photo in photo_list:
request = requests.get(
f'https://live.staticflickr.com/{photo["server"]}/' f'{photo["id"]}_{photo["secret"]}_b.jpg'
)
) # noqa: E231
photo_file = ImageFile(io.BytesIO(request.content), name=f'{photo["id"]}.jpg')
photo_files_list.append(photo_file)
return photo_files_list if len(photo_files_list) else None
Expand Down
2 changes: 1 addition & 1 deletion core/management/commands/copy_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ def command():

click.echo(
click.style(f"Website is ready here: https://djangogirls.org/{new_event.page_url}", bold=True, fg="green")
)
) # noqa: E231
click.echo("Congrats on yet another event!")
4 changes: 2 additions & 2 deletions core/management/commands/new_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def command(short):
click.secho("OOPS! Something went wrong!", fg="red")
for field, errors in form.errors.items():
for error in errors:
click.secho(f" {field:10} {error}", fg="red")
click.secho(f" {field:10} {error}", fg="red") # noqa: E231
return
event = form.save()

Expand All @@ -86,7 +86,7 @@ def command(short):

event.save()

click.secho(f"Website is ready here: http://djangogirls.org/{url}", fg="green")
click.secho(f"Website is ready here: http://djangogirls.org/{url}", fg="green") # noqa: E231
click.echo(DELIMITER)

click.secho("Ok, now follow this:", fg="black", bg="green")
Expand Down
2 changes: 1 addition & 1 deletion core/management/commands/prepare_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def generate_html_content(event_list):
for event in event_list:
city = event.city
url = event.page_url
html = f"<a href='https://djangogirls.org/{url}'>{city}</a>"
html = f"<a href='https://djangogirls.org/{url}'>{city}</a>" # noqa: E231
result.append(html)
return result

Expand Down
2 changes: 1 addition & 1 deletion core/management_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ def brag_on_slack_bang(city, country, team):
f":django_pony: :zap: Woohoo! :tada: New Django Girls alert! "
f"Welcome Django Girls {city}, {country}. "
f"Congrats {', '.join(['{} {}'.format(x.first_name, x.last_name) for x in team])}!"
)
) # noqa: E231

post_message_to_slack("#general", text)
2 changes: 1 addition & 1 deletion djangogirls/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def gettext(s):
DATABASES = {}
DATABASES["default"] = dj_database_url.config(
default=f"postgres://{POSTGRES_USER}:{POSTGRES_PASSWORD}@{POSTGRES_HOST}:{POSTGRES_PORT}/{POSTGRES_DB}"
)
) # noqa: E231

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

Expand Down
6 changes: 3 additions & 3 deletions tests/applications/views/test_applications_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_download_applications_list(admin_client, future_event, future_event_for
applications_url = reverse("applications:applications_csv", kwargs={"page_url": future_event.page_url})
resp = admin_client.get(applications_url)
assert resp.status_code == 200
assert resp.get("Content-Disposition") == f'attachment; filename="{future_event.page_url}.csv"'
assert resp.get("Content-Disposition") == f'attachment; filename="{future_event.page_url}.csv"' # noqa: E702
csv_file = StringIO(resp.content.decode("utf-8"))
reader = csv.reader(csv_file)
csv_list = list(reader)
Expand All @@ -32,7 +32,7 @@ def test_download_applications_list_uses_query_parameters_to_filter_applications
applications_url = reverse("applications:applications_csv", kwargs={"page_url": future_event.page_url})
resp = admin_client.get(applications_url + "?state=submitted&state=accepted")
assert resp.status_code == 200
assert resp.get("Content-Disposition") == f'attachment; filename="{future_event.page_url}.csv"'
assert resp.get("Content-Disposition") == f'attachment; filename="{future_event.page_url}.csv"' # noqa: E702
csv_file = StringIO(resp.content.decode("utf-8"))
reader = csv.reader(csv_file)
csv_list = list(reader)
Expand Down Expand Up @@ -61,7 +61,7 @@ def test_download_applications_list_with_question_added(
resp = admin_client.get(applications_url)

assert resp.status_code == 200
assert resp.get("Content-Disposition") == f'attachment; filename="{future_event.page_url}.csv"'
assert resp.get("Content-Disposition") == f'attachment; filename="{future_event.page_url}.csv"' # noqa: E702
csv_file = StringIO(resp.content.decode("utf-8"))
reader = csv.reader(csv_file)
csv_list = list(reader)
Expand Down

0 comments on commit df94ce3

Please sign in to comment.