Skip to content

Commit

Permalink
Remove __str__ from ExecMode
Browse files Browse the repository at this point in the history
EXTENSIONS yaml_all and json_all do not overlap
  • Loading branch information
pavlemarinkovic committed Nov 13, 2023
1 parent c1a5185 commit 94e3056
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions sbpack/noncwl/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class EXTENSIONS:
cwl = 'cwl'

yaml_all = [yaml, yml, cwl]
json_all = [json, cwl]
json_all = [json]
all_ = [yaml, yml, json, cwl]


Expand Down Expand Up @@ -96,6 +96,3 @@ class EXTENSIONS:
class ExecMode(Enum):
single = 'single-instance'
multi = 'multi-instance'

def __str__(self):
return self.value
2 changes: 1 addition & 1 deletion sbpack/noncwl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def update_schema_code_package(sb_schema, schema_ext, new_code_package):
sb_schema_dict = pack(sb_schema)
sb_schema_dict['app_content']['code_package'] = new_code_package

if schema_ext.lower() == EXTENSIONS.json:
if schema_ext.lower() in EXTENSIONS.json_all:
with open(sb_schema, 'w') as file:
json.dump(sb_schema_dict, file)

Expand Down

0 comments on commit 94e3056

Please sign in to comment.