Skip to content

Commit

Permalink
make the linter happy;
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesrichter committed Oct 6, 2023
1 parent e198986 commit 0b5d864
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions koi_api/resources/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
json_request,
)
from koi_api.common.string_constants import BODY_ROLE as BR, BODY_PARAM as BP
from koi_api.common.return_codes import SUCCESS, ERR_FORB, ERR_NOFO, ERR_BADR, ERR_FATL
from koi_api.common.return_codes import SUCCESS, ERR_FORB, ERR_NOFO, ERR_BADR
from koi_api.orm.parameters import ORMInstanceParameter, ORMModelParameter


Expand Down Expand Up @@ -155,7 +155,7 @@ def post(self, model_uuid, model, instance_uuid, instance, me, json_object):
instance_param_value = json_object[BP.PARAM_VALUE]
if not any([isinstance(instance_param_value, t) for t in [str, int, float]]):
return ERR_BADR("wrong field type: " + BP.PARAM_VALUE)

instance_param = ORMInstanceParameter.query.filter_by(
model_param_id=model_param.param_id
).one_or_none()
Expand Down Expand Up @@ -189,7 +189,7 @@ class APIInstanceParameterCollection(BaseResource):
@model_access([BR.ROLE_SEE_MODEL])
@instance_access([BR.ROLE_SEE_INSTANCE])
def get(self, model_uuid, model, instance_uuid, instance, me, param_uuid):

try:
param_uuid = UUID(param_uuid)
except ValueError:
Expand Down Expand Up @@ -222,7 +222,7 @@ def post(self, model_uuid, model, instance_uuid, instance, me, param_uuid):
@json_request
def put(
self, model_uuid, model, instance_uuid, instance, me, param_uuid, json_object
):
):
try:
param_uuid = UUID(param_uuid)
except ValueError:
Expand Down
2 changes: 1 addition & 1 deletion koi_api/resources/sample_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def put(

# go through all tags in the json_list
for tag in json_object:
#check that the tag is a dict with teh valid format
# check that the tag is a dict with teh valid format
if not isinstance(tag, dict):
return ERR_BADR("Expected a tag to be a dict")
if BT.TAG_NAME not in tag.keys():
Expand Down

0 comments on commit 0b5d864

Please sign in to comment.