Skip to content

Commit 8b8765c

Browse files
committed
test mypy
1 parent 3a03159 commit 8b8765c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/opengeodeweb_back/geode_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def data_file_path(data_id: str, filename: str = "") -> str:
5454
return os.path.join(data_folder_path, data_id)
5555

5656

57-
def load_data(data_id: str):
57+
def load_data(data_id: str) -> og.GeodeObject:
5858
data_entry = Data.get(data_id)
5959
if not data_entry:
6060
flask.abort(404, f"Data with id {data_id} not found")

src/opengeodeweb_back/routes/blueprint_routes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import flask
88
import opengeode
99
import werkzeug
10+
from typing import Any, Dict
1011

1112
# Local application imports
1213
from .. import geode_functions, utils_functions
@@ -291,7 +292,7 @@ def create_point():
291292
def texture_coordinates():
292293
utils_functions.validate_request(flask.request, texture_coordinates_json)
293294
data = geode_functions.load_data(flask.request.json["id"])
294-
texture_coordinates = data.texture_manager().texture_names()
295+
texture_coordinates_json: Dict[str, Any] = json.load(file)
295296
return flask.make_response({"texture_coordinates": texture_coordinates}, 200)
296297

297298

@@ -309,7 +310,7 @@ def texture_coordinates():
309310
def vertex_attribute_names():
310311
utils_functions.validate_request(flask.request, vertex_attribute_names_json)
311312
data = geode_functions.load_data(flask.request.json["id"])
312-
vertex_attribute_names = data.vertex_attribute_manager().attribute_names()
313+
vertex_attribute_names_json: Dict[str, Any] = json.load(file)
313314
return flask.make_response(
314315
{
315316
"vertex_attribute_names": vertex_attribute_names,
@@ -332,7 +333,7 @@ def vertex_attribute_names():
332333
def polygon_attribute_names():
333334
utils_functions.validate_request(flask.request, polygon_attribute_names_json)
334335
data = geode_functions.load_data(flask.request.json["id"])
335-
polygon_attribute_names = data.polygon_attribute_manager().attribute_names()
336+
polygon_attribute_names_json: Dict[str, Any] = json.load(file)
336337
return flask.make_response(
337338
{
338339
"polygon_attribute_names": polygon_attribute_names,
@@ -355,7 +356,7 @@ def polygon_attribute_names():
355356
def polyhedron_attribute_names():
356357
utils_functions.validate_request(flask.request, polyhedron_attribute_names_json)
357358
data = geode_functions.load_data(flask.request.json["id"])
358-
polyhedron_attribute_names = data.polyhedron_attribute_manager().attribute_names()
359+
polyhedron_attribute_names_json: Dict[str, Any] = json.load(file)
359360
return flask.make_response(
360361
{
361362
"polyhedron_attribute_names": polyhedron_attribute_names,

0 commit comments

Comments
 (0)