Skip to content

Commit

Permalink
remove some type ignores
Browse files Browse the repository at this point in the history
Now that cwl-upgrader & schema-salad have upgraded to newer ruamel.yaml
  • Loading branch information
mr-c committed May 16, 2023
1 parent 129672a commit 4e8edbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cwl_utils/expression_refactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def refactor(args: argparse.Namespace) -> int:
"""Primary processing loop."""
return_code = 0
yaml = YAML(typ="rt")
yaml.preserve_quotes = True # type: ignore[assignment]
yaml.preserve_quotes = True
for document in args.inputs:
_logger.info("Processing %s.", document)
with open(document) as doc_handle:
Expand Down
6 changes: 3 additions & 3 deletions cwl_utils/graph_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def graph_split(
) -> None:
"""Loop over the provided packed CWL document and split it up."""
yaml = YAML(typ="rt")
yaml.preserve_quotes = True # type: ignore[assignment]
yaml.preserve_quotes = True
source = yaml.load(sourceIO)
add_lc_filename(source, sourceIO.name)

Expand Down Expand Up @@ -255,8 +255,8 @@ def yaml_dump(entry: Any, output_file: str, pretty: bool) -> None:
"""Output object as YAML."""
yaml = YAML(typ="rt")
yaml.default_flow_style = False
yaml.map_indent = 4 # type: ignore[assignment]
yaml.sequence_indent = 2 # type: ignore[assignment]
yaml.map_indent = 4
yaml.sequence_indent = 2
with open(output_file, "w", encoding="utf-8") as result_handle:
if pretty:
result_handle.write(stringify_dict(entry))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
)
TEST_v1_2_CWL = get_data("testdata/workflow_input_format_expr_v1_2.cwl")
yaml = YAML(typ="rt")
yaml.preserve_quotes = True # type: ignore[assignment]
yaml.preserve_quotes = True


def test_cwl_version() -> None:
Expand Down

0 comments on commit 4e8edbf

Please sign in to comment.