Skip to content

Commit

Permalink
simplify mypy config
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Aug 14, 2023
1 parent 663449b commit 10fda17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cwlupgrader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def hints_and_requirements_clean(document: Dict[str, Any]) -> None:
document[section] = new_section


def shorten_type(type_obj: List[Any]) -> Union[str, List[Any]]:
def shorten_type(type_obj: Union[str, List[Any]]) -> Union[str, List[Any]]:
"""Transform draft-3 style type declarations into idiomatic v1.0 types."""
if isinstance(type_obj, str) or not isinstance(type_obj, Sequence):
return type_obj
Expand Down
21 changes: 2 additions & 19 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
[mypy]
strict = True
show_error_context = true
show_column_numbers = true
show_error_codes = true
pretty = true

# --strict options as of mypy 0.910
warn_unused_configs = True
disallow_any_generics = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_return_any = True
implicit_reexport = False
strict_equality = True

[mypy-ruamel.*]
ignore_errors = True
warn_unreachable = True

0 comments on commit 10fda17

Please sign in to comment.