Skip to content

Commit

Permalink
Cosmetic type annotation changes (partially suggested by mypyc)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfernandez committed Sep 6, 2023
1 parent 0a2bfb9 commit 07cdb21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions wfexs_backend/wfexs_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ def getWorkflowRepoFromROCrateFile(
# self.logger.debug(roCrateObj.root_dataset.as_jsonld())
mainEntityProgrammingLanguageId = None
mainEntityProgrammingLanguageUrl = None
mainEntityIdHolder = None
mainEntityIdHolder: "Optional[str]" = None
mainEntityId = None
workflowPID = None
workflowUploadURL = None
Expand Down Expand Up @@ -2155,8 +2155,8 @@ def getWorkflowRepoFromROCrateFile(
mainEntityProgrammingLanguageUrl = eAsLD.get("url", {}).get("@id")

# Now, it is time to match the language id
engineDescById = None
engineDescByUrl = None
engineDescById: "Optional[WorkflowType]" = None
engineDescByUrl: "Optional[WorkflowType]" = None
for possibleEngineDesc in WF.WORKFLOW_ENGINES:
if (engineDescById is None) and (
mainEntityProgrammingLanguageId is not None
Expand Down Expand Up @@ -2310,7 +2310,7 @@ def downloadContent(
), "The list of remote URIs to download should have at least one element"

firstURI: "Optional[Union[URIType, LicensedURI]]" = None
firstParsedURI = None
firstParsedURI: "Optional[parse.ParseResult]" = None
remote_uris: "MutableSequence[URIType]" = []
# Brief validation of correct uris
for remote_uri_e in remote_uris_e:
Expand Down
4 changes: 2 additions & 2 deletions wfexs_backend/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
# CWL detection is before, as Nextflow one is
# a bit lax (only detects a couple of too common
# keywords)
WORKFLOW_ENGINE_CLASSES: "Sequence[Type[WorkflowEngine]]" = [
WORKFLOW_ENGINE_CLASSES: "Final[Sequence[Type[WorkflowEngine]]]" = [
CWLWorkflowEngine,
NextflowWorkflowEngine,
]
Expand Down Expand Up @@ -1687,7 +1687,7 @@ def formatParams(
self, params: "Optional[ParamsBlock]", prefix: "str" = ""
) -> "Optional[ParamsBlock]":
if params is None:
return params
return None

formatted_params: "MutableParamsBlock" = dict()
some_formatted = False
Expand Down

0 comments on commit 07cdb21

Please sign in to comment.