Skip to content

Commit

Permalink
Upgrade black to 24.10.x (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Dickinson authored Dec 24, 2024
1 parent b5b7245 commit b5e7a03
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dev = [
"pytest == 7.4.*",
"parameterized == 0.9.*",
"flake8 == 6.1.*",
"black == 23.7.*",
"black == 24.10.*",
"isort == 5.12.*",
"coverage == 7.3.*",
"mypy == 1.10.0",
Expand Down
8 changes: 5 additions & 3 deletions src/meshapi/util/join_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ def get_all(
response = self.s3_client.list_objects_v2(
Bucket=JOIN_RECORD_BUCKET_NAME,
Prefix=f"{JOIN_RECORD_PREFIX}/v3/{submission_prefix.value}",
StartAfter=since.strftime(f"{JOIN_RECORD_PREFIX}/v3/{submission_prefix.value}/%Y/%m/%d/%H/%M/%S")
if isinstance(since, datetime.datetime)
else "",
StartAfter=(
since.strftime(f"{JOIN_RECORD_PREFIX}/v3/{submission_prefix.value}/%Y/%m/%d/%H/%M/%S")
if isinstance(since, datetime.datetime)
else ""
),
)

join_records = []
Expand Down
6 changes: 3 additions & 3 deletions src/meshapi/util/uisp_import/sync_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def import_and_sync_uisp_devices(uisp_devices: List[UISPDevice]) -> None:
"uisp_id": uisp_uuid,
"status": uisp_status,
"install_date": parse_uisp_datetime(uisp_device["overview"]["createdAt"]).date(),
"abandon_date": uisp_last_seen.date()
if uisp_last_seen and uisp_status == Device.DeviceStatus.INACTIVE
else None,
"abandon_date": (
uisp_last_seen.date() if uisp_last_seen and uisp_status == Device.DeviceStatus.INACTIVE else None
),
"notes": f"Automatically imported from UISP on {datetime.date.today().isoformat()}\n\n",
}

Expand Down
8 changes: 5 additions & 3 deletions src/meshapi/views/geography.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ def get(self, request: HttpRequest) -> HttpResponse:
placemark = kml.Placemark(
name=f"Links-{link_dict['link_label']}",
style_url=styles.StyleUrl(
url="#grey_line"
if link_dict["is_los"]
else ("#red_line" if link_dict["mark_active"] else "#dark_grey_line")
url=(
"#grey_line"
if link_dict["is_los"]
else ("#red_line" if link_dict["mark_active"] else "#dark_grey_line")
)
),
kml_geometry=geometry.LineString(
geometry=LineString([link_dict["from_coord"], link_dict["to_coord"]]),
Expand Down
8 changes: 5 additions & 3 deletions src/meshapi/views/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ def get_queryset(self) -> List[Install]: # type: ignore[override]
Install(
install_number=node.network_number,
node=node,
status=Install.InstallStatus.NN_REASSIGNED
if node.status == node.NodeStatus.ACTIVE
else Install.InstallStatus.REQUEST_RECEIVED,
status=(
Install.InstallStatus.NN_REASSIGNED
if node.status == node.NodeStatus.ACTIVE
else Install.InstallStatus.REQUEST_RECEIVED
),
building=building,
request_date=request_date,
roof_access=representative_install.roof_access if representative_install else True,
Expand Down

0 comments on commit b5e7a03

Please sign in to comment.