Skip to content

Commit ce596cb

Browse files
author
Sean Sullivan
committed
Fix lint
1 parent caa1168 commit ce596cb

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

elastic_datashader/parameters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class SearchParams(BaseModel):
2424
geopoint_field: str
2525
params: dict
2626
cmap: str = Field(default="bym")
27-
resolution:str = Field(default="finest")
28-
span_range:str = Field(default="auto", alias='span')
29-
spread:str = Field(default="auto") # Point Size
30-
timeOverlap:bool = Field(default=False)
31-
timeOverlapSize:str = Field(default="auto")
32-
timestamp_field:str = Field(default="@timestamp")
27+
resolution: str = Field(default="finest")
28+
span_range: str = Field(default="auto", alias='span')
29+
spread: str = Field(default="auto") # Point Size
30+
timeOverlap: bool = Field(default=False)
31+
timeOverlapSize: str = Field(default="auto")
32+
timestamp_field: str = Field(default="@timestamp")
3333
search_nautical_miles: int = Field(default=50)
3434
geofield_type: str = Field(default='geo_point')
3535
bucket_max: float = Field(default=100, ge=0, le=100)

elastic_datashader/routers/tms.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def generate_tile_to_cache(idx: str, x: int, y: int, z: int, params, parameter_h
282282
logger.debug("Releasing cache placeholder %s", rendering_tile_name(idx, x, y, z, parameter_hash))
283283
release_cache_placeholder(config.cache_path, rendering_tile_name(idx, x, y, z, parameter_hash))
284284

285-
async def fetch_or_render_tile(already_waited: int, idx: str, x: int, y: int, z: int, request: Request, background_tasks: BackgroundTasks,post_params={}):
285+
async def fetch_or_render_tile(already_waited: int, idx: str, x: int, y: int, z: int, request: Request, background_tasks: BackgroundTasks, post_params={}):
286286
check_proxy_key(request.headers.get('tms-proxy-key'))
287287

288288
es = Elasticsearch(
@@ -295,7 +295,7 @@ async def fetch_or_render_tile(already_waited: int, idx: str, x: int, y: int, z:
295295
try:
296296
print(request.query_params)
297297
print(post_params)
298-
parameter_hash, params = extract_parameters(request.headers, {**request.query_params,**post_params})
298+
parameter_hash, params = extract_parameters(request.headers, {**request.query_params, **post_params})
299299
# try to build the dsl object bad filters cause exceptions that are then retried.
300300
# underlying elasticsearch_dsl doesn't support the elasticsearch 8 api yet so this causes requests to thrash
301301
# If the filters are bad or elasticsearch_dsl cannot build the request will never be completed so serve X tile
@@ -350,15 +350,15 @@ async def get_tms_after_wait(already_waited: int, idx: str, x: int, y: int, z: i
350350

351351

352352
@router.post("/{idx}/{z}/{x}/{y}.png")
353-
async def post_tile(already_waited: int,idx: str, x: int, y: int, z: int, request: Request,params: SearchParams, background_tasks: BackgroundTasks):
353+
async def post_tile(already_waited: int, idx: str, x: int, y: int, z: int, request: Request, params: SearchParams, background_tasks: BackgroundTasks):
354354
params = params.dict()
355355
params["params"] = json.dumps(params["params"])
356-
response = await fetch_or_render_tile(0, idx, x, y, z, request, background_tasks,post_params=params)
357-
if isinstance(response,RedirectResponse):
356+
response = await fetch_or_render_tile(0, idx, x, y, z, request, background_tasks, post_params=params)
357+
if isinstance(response, RedirectResponse):
358358
print(response.headers)
359-
return JSONResponse(status_code=200, content={"retry-after":response.headers['retry-after']})
359+
return JSONResponse(status_code=200, content={"retry-after": response.headers['retry-after']})
360360
return response
361361

362362

363363

364-
364+

elastic_datashader/tilegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ def generate_tile(idx, x, y, z, headers, params, tile_width_px=256, tile_height_
969969

970970
# Create base search
971971
base_s = get_search_base(config.elastic_hosts, headers, params, idx)
972-
#base_s = base_s[0:0]
972+
# base_s = base_s[0:0]
973973
# Now find out how many documents
974974
count_s = copy.copy(base_s)[0:0] # slice of array sets from/size since we are aggregating the data we don't need the hits
975975
count_s = count_s.filter("geo_bounding_box", **{geopoint_field: bb_dict})

0 commit comments

Comments
 (0)