Skip to content

Commit

Permalink
Fix black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Powers committed Nov 11, 2024
1 parent 864ebae commit 99ac667
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion trovi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
# Plugins
"rest_framework",
"drf_spectacular",
'corsheaders',
"corsheaders",
# Trovi
"trovi.apps.TroviConfig",
"trovi.api.apps.ApiConfig",
Expand Down
1 change: 1 addition & 0 deletions util/sql_format.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Pretty-Print SQL queries for console output."""

from logging import Formatter

from django.conf import settings
Expand Down
17 changes: 10 additions & 7 deletions util/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Not meant to be robust, and mostly unvalidated, but helpful to avoid
having to reference dicts with strings repeatedly in tests.
"""

import datetime
import logging
import os
Expand Down Expand Up @@ -272,9 +273,9 @@ def generate_fake_artifact() -> list[models.Model]:
ArtifactEvent(
artifact_version=random.choice(artifact_versions),
event_type=random.choice(ArtifactEvent.EventType.values),
event_origin=None
if fake.boolean(chance_of_getting_true=90)
else fake_user_urn(),
event_origin=(
None if fake.boolean(chance_of_getting_true=90) else fake_user_urn()
),
)
for _ in range(random.randint(0, 40))
]
Expand All @@ -284,10 +285,12 @@ def _verified() -> dict[str, Union[bool, Optional[datetime.datetime]]]:
verified = fake.boolean(chance_of_getting_true=20)
return {
"verified": verified,
"verified_at": None
if not verified
else fake.date_time_between(
datetime.date.min, datetime.date.max, timezone.utc
"verified_at": (
None
if not verified
else fake.date_time_between(
datetime.date.min, datetime.date.max, timezone.utc
)
),
}

Expand Down

0 comments on commit 99ac667

Please sign in to comment.