Skip to content

Commit 90b9c8d

Browse files
authored
refactor(api): fix/suppress type errors to enable strict mode (#8335)
1 parent 08c049b commit 90b9c8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+624
-364
lines changed

api/Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ ot_shared_data_sources := $(filter %.json,$(shell $(SHX) find ../shared-data/))
5050
ot_resources := $(filter %,$(shell $(SHX) find src/opentrons/resources))
5151
ot_sources := $(ot_py_sources) $(ot_shared_data_sources) $(ot_resources)
5252

53-
# test modules to typecheck
54-
# TODO(mc, 2021-07-23): expand this to all tests
55-
ot_tests_to_typecheck := \
56-
tests/opentrons/motion_planning \
57-
tests/opentrons/protocol_api_experimental \
58-
tests/opentrons/protocol_engine \
59-
tests/opentrons/protocol_runner
60-
6153
# Defined separately than the clean target so the wheel file doesn’t have to
6254
# depend on a PHONY target
6355
clean_cmd = $(SHX) rm -rf build dist .coverage coverage.xml '*.egg-info' '**/__pycache__' '**/*.pyc' 'src/**/.mypy_cache'
@@ -94,7 +86,7 @@ test:
9486

9587
.PHONY: lint
9688
lint:
97-
$(python) -m mypy src $(ot_tests_to_typecheck)
89+
$(python) -m mypy src tests
9890
$(python) -m black --check src tests setup.py
9991
$(python) -m flake8 src tests setup.py
10092

api/Pipfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python_version = "3.7"
99
[dev-packages]
1010
opentrons = {editable = true, path = "."}
1111
coverage = "==5.1"
12-
mypy = "==0.800"
12+
mypy = "0.910"
1313
numpydoc = "==0.9.1"
1414
pytest = "==6.1.0"
1515
pytest-aiohttp = "==0.3.0"
@@ -33,6 +33,8 @@ black = "==21.7b0"
3333
# https://github.com/pypa/pipenv/issues/4408#issuecomment-668324177
3434
atomicwrites = {version="==1.4.0", sys_platform="== 'win32'"}
3535
colorama = {version="==0.4.4", sys_platform="== 'win32'"}
36+
types-mock = "==4.0.1"
37+
types-setuptools = "==57.0.2"
3638

3739
[packages]
3840
opentrons-shared-data = {editable = true, path = "../shared-data/python"}

api/Pipfile.lock

Lines changed: 87 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)