make linter happy
This commit is contained in:
parent
30b0c12ebe
commit
ef83e73a36
18 changed files with 31 additions and 26 deletions
|
@ -183,7 +183,7 @@ class MapUpdate(models.Model):
|
|||
|
||||
logger.info('Rebuilding locator...')
|
||||
from c3nav.routing.locator import Locator
|
||||
locator = Locator.rebuild(new_updates[-1].to_tuple, router)
|
||||
Locator.rebuild(new_updates[-1].to_tuple, router)
|
||||
|
||||
for new_update in reversed(new_updates):
|
||||
new_update.processed = True
|
||||
|
|
|
@ -101,7 +101,8 @@ class LevelRenderData:
|
|||
if coords:
|
||||
last_interpolator = NearestNDInterpolator(np.vstack(coords), np.vstack(values))
|
||||
else:
|
||||
last_interpolator = NearestNDInterpolator(np.array([[0, 0]]), np.array([float(render_level.base_altitude)]))
|
||||
last_interpolator = NearestNDInterpolator(np.array([[0, 0]]),
|
||||
np.array([float(render_level.base_altitude)]))
|
||||
|
||||
"""
|
||||
second pass, forward to create the LevelRenderData for each level
|
||||
|
|
|
@ -99,8 +99,8 @@ class MapRenderer:
|
|||
geometry = altitudearea.geometry.difference(crop_areas)
|
||||
if not_full_levels:
|
||||
geometry = geometry.filter(bottom=False)
|
||||
engine.add_geometry(geometry, altitude=altitudearea.altitude, fill=FillAttribs(RENDER_COLOR_GROUND_FILL),
|
||||
category='ground', item=i)
|
||||
engine.add_geometry(geometry, altitude=altitudearea.altitude,
|
||||
fill=FillAttribs(RENDER_COLOR_GROUND_FILL), category='ground', item=i)
|
||||
|
||||
j = 0
|
||||
for (order, color), areas in altitudearea.colors.items():
|
||||
|
|
|
@ -16,7 +16,7 @@ def schema_description(schema):
|
|||
|
||||
|
||||
def schema_definition(schema):
|
||||
return ("- **"+re.sub(r"([a-z])([A-Z])", r"\1 \2", schema.__name__.removesuffix("Schema")) +"**: " +
|
||||
return ("- **"+re.sub(r"([a-z])([A-Z])", r"\1 \2", schema.__name__.removesuffix("Schema")) + "**: " +
|
||||
schema_description(schema).split("\n")[0].strip())
|
||||
|
||||
|
||||
|
@ -163,7 +163,7 @@ class SpecificLocationSchema(LocationSchema):
|
|||
Annotated[list[PositiveInt], APIField(
|
||||
title="array of location IDs",
|
||||
description="for categories that have `single` set to `false`. can be an empty array.",
|
||||
example=[1,4,5],
|
||||
example=[1, 4, 5],
|
||||
)],
|
||||
Annotated[PositiveInt, APIField(
|
||||
title="one location ID",
|
||||
|
|
2
src/c3nav/mapdata/utils/cache/package.py
vendored
2
src/c3nav/mapdata/utils/cache/package.py
vendored
|
@ -108,7 +108,7 @@ class CachePackage:
|
|||
return cls(bounds, levels)
|
||||
|
||||
@classmethod
|
||||
def open(cls, package:Optional[str | os.PathLike] = None) -> Self:
|
||||
def open(cls, package: Optional[str | os.PathLike] = None) -> Self:
|
||||
if package is None:
|
||||
from django.conf import settings
|
||||
package = settings.CACHE_ROOT / 'package.tar'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import json
|
||||
import math
|
||||
from collections import deque, namedtuple
|
||||
from itertools import chain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue