Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NishchayKarle committed Feb 21, 2024
1 parent 300e6aa commit 64ecfac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cwl/cwl_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def __process_array_value(self, value: Any, str_quote="") -> str:

def __lt__(self, other) -> bool:
if self.position is None:
return other.position is None
return other.position is not None
return True if other.position is None else self.position < other.position


Expand Down Expand Up @@ -331,7 +331,7 @@ def validate_cwl(cls, cwl_content: Dict[str, any]) -> Dict[str, any]:
"id": Regex(
r"^[a-zA-Z_][a-zA-Z0-9_]*$",
),
"type": input_simple_types,
"type": input_types_schema,
Opt("items"): Or(*input_simple_types),
Opt("default"): Or(
int, float, str, bool, list, error="Invalid default value"
Expand Down Expand Up @@ -499,7 +499,7 @@ def get_command(self, **kwargs) -> str:
else:
raise ArgumentMissing(f"missing required value for argument: {input_arg.arg_id}")

return f"{self.__base_command} {' '.join(input_args)}"
return f"{self.__base_command} {' '.join(filter(None, input_args))}"

def __get_parsl_bash_app_args(self, **kwargs) -> Dict[str, Any]:
"""Args needed to run the command using Parsl
Expand Down

0 comments on commit 64ecfac

Please sign in to comment.