Skip to content

Commit

Permalink
Getting ./bin/pyl to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
jbirddog committed Dec 19, 2023
1 parent 5cd3b2e commit af8827c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

class DataStoreCRUD:
@staticmethod
def create_instance(name: str, identifier: str, location: str, schema: dict[str, Any], description: str | None):
def create_instance(name: str, identifier: str, location: str, schema: dict[str, Any], description: str | None) -> None:
raise Exception("must implement")

@staticmethod
def existing_data_stores() -> list[dict[str, Any]]:
raise Exception("must implement")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _data_store_location_for_task(spiff_task: SpiffTask, identifier: str) -> str
if _data_store_exists_at_location(location, identifier):
return location
location = ReferenceCacheService.upsearch(location, identifier, "data_store")
#if location is None or not _data_store_exists_at_location(location, identifier):
# if location is None or not _data_store_exists_at_location(location, identifier):
# return None
return location

Expand All @@ -43,7 +43,7 @@ class JSONDataStore(BpmnDataStoreSpecification, DataStoreCRUD): # type: ignore
"""JSONDataStore."""

@staticmethod
def create_instance(name: str, identifier: str, location: str, schema: dict[str, Any], description: str | None):
def create_instance(name: str, identifier: str, location: str, schema: dict[str, Any], description: str | None) -> None:
model = JSONDataStoreModel(
name=name,
identifier=identifier,
Expand All @@ -54,7 +54,7 @@ def create_instance(name: str, identifier: str, location: str, schema: dict[str,
)
db.session.add(model)
db.session.commit()

@staticmethod
def existing_data_stores() -> list[dict[str, Any]]:
data_stores = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def data_store_create(body: dict) -> flask.wrappers.Response:
"A valid JSON Schema is required when creating a new data store instance.",
status_code=400,
) from e

try:
schema = json.loads(schema)
except Exception as e:
Expand Down

0 comments on commit af8827c

Please sign in to comment.