Skip to content

Commit be00beb

Browse files
committed
upgrade to mypy 0.800
1 parent 506ac9d commit be00beb

File tree

14 files changed

+25
-28
lines changed

14 files changed

+25
-28
lines changed

.github/workflows/ci-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ jobs:
1919
py-ver-major: [3]
2020
py-ver-minor: [6, 7, 8, 9]
2121
step: [lint, unit, bandit, mypy]
22-
exclude:
23-
- py-ver-major: 3
24-
py-ver-minor: 9
25-
step: mypy
2622

2723
env:
2824
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}

cwltool/context.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
# move to a regular typing import when Python 3.3-3.6 is no longer supported
99
from ruamel.yaml.comments import CommentedMap
1010
from schema_salad.avro.schema import Names
11-
from schema_salad.ref_resolver import FetcherCallableType, Loader
11+
from schema_salad.ref_resolver import Loader
12+
from schema_salad.utils import FetcherCallableType
1213
from typing_extensions import TYPE_CHECKING
1314

1415
from .builder import Builder, HasReqsHints

cwltool/cwlrdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from rdflib import Graph
66
from ruamel.yaml.comments import CommentedMap
77
from schema_salad.jsonld_context import makerdf
8-
from schema_salad.ref_resolver import ContextType
8+
from schema_salad.utils import ContextType
99

1010
from .cwlviewer import CWLViewer
1111
from .process import Process

cwltool/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
from ruamel.yaml.comments import CommentedMap, CommentedSeq
3838
from schema_salad.exceptions import ValidationException
3939
from schema_salad.ref_resolver import (
40-
ContextType,
41-
FetcherCallableType,
4240
Loader,
4341
file_uri,
4442
uri_file_path,
4543
)
4644
from schema_salad.sourceline import strip_dup_lineno
47-
from schema_salad.utils import json_dumps
45+
from schema_salad.utils import json_dumps, ContextType, FetcherCallableType
4846

4947
from . import command_line_tool, workflow
5048
from .argparser import arg_parser, generate_parser, get_default_args

cwltool/mpi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def load(cls: Type[MpiConfigT], config_file_name: str) -> MpiConfigT:
5353
optional).
5454
"""
5555
with open(config_file_name) as cf:
56-
data = yaml.round_trip_load(cf)
56+
data = yaml.main.round_trip_load(cf)
5757
try:
5858
return cls(**data)
5959
except TypeError as e:

cwltool/mutation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .errors import WorkflowException
55
from .utils import CWLObjectType
66

7-
MutationState = namedtuple("MutationTracker", ["generation", "readers", "stepname"])
7+
MutationState = namedtuple("MutationState", ["generation", "readers", "stepname"])
88

99
_generation = "http://commonwl.org/cwltool#generation"
1010

cwltool/pack.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
)
1616

1717
from ruamel.yaml.comments import CommentedMap, CommentedSeq
18-
from schema_salad.ref_resolver import Loader, ResolveType, SubLoader
18+
from schema_salad.ref_resolver import Loader, SubLoader
19+
from schema_salad.utils import ResolveType
1920

2021
from .context import LoadingContext
2122
from .load_tool import fetch_document, resolve_and_validate_document

cwltool/validate_js.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def get_expressions(
116116
return []
117117

118118

119-
JSHintJSReturn = namedtuple("jshint_return", ["errors", "globals"])
119+
JSHintJSReturn = namedtuple("JSHintJSReturn", ["errors", "globals"])
120120

121121

122122
def jshint_js(

mypy.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[mypy]
2-
# --strict options as of mypy 0.720
2+
# --strict options as of mypy 0.800
33
warn_unused_configs = True
4-
disallow_subclassing_any = True
54
disallow_any_generics = True
5+
disallow_subclassing_any = True
66
disallow_untyped_calls = True
77
disallow_untyped_defs = True
88
disallow_incomplete_defs = True
@@ -12,7 +12,8 @@ no_implicit_optional = True
1212
warn_redundant_casts = True
1313
warn_unused_ignores = True
1414
warn_return_any = True
15-
implicit_reexport = True
15+
implicit_reexport = False
16+
strict_equality = True
1617

1718
[mypy-schema_salad.tests.*]
1819
ignore_errors = True

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
setup_requires=PYTEST_RUNNER,
122122
test_suite="tests",
123123
tests_require=[
124-
"pytest == 6.0.2",
124+
"pytest >= 6.0.2, < 6.2",
125125
"mock >= 2.0.0",
126126
"pytest-mock >= 1.10.0",
127127
"arcp >= 0.2.0",

0 commit comments

Comments
 (0)