Skip to content

Commit

Permalink
Merge pull request #143 from jenshnielsen/mypy_better_missing_imports
Browse files Browse the repository at this point in the history
Mypy better missing imports
  • Loading branch information
jenshnielsen authored Aug 16, 2022
2 parents d1061cf + 47e9879 commit e4b57ba
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
19 changes: 18 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = 'setuptools.build_meta'
[tool.mypy]
strict_optional = true
disallow_untyped_decorators = true
ignore_missing_imports = true
ignore_missing_imports = false
show_column_numbers = true
warn_unused_ignores = true
warn_unused_configs = true
Expand All @@ -22,6 +22,23 @@ module = [
]
ignore_errors = true

# these are packages that we import
# but either don't have stubs or we
# dont have them installed.
[[tool.mypy.overrides]]
module = [
"cffi",
"keysightSD1",
"nidaqmx.*",
"niswitch.*",
"pandas",
"py_header.*",
"pyspcm",
"spirack",
"zhinst.*"
]
ignore_missing_imports = true

[tool.versioningit]
default-version = "0.0"

Expand Down
6 changes: 3 additions & 3 deletions qcodes_contrib_drivers/tests/test_Keysight_M3201A.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
import unittest

try:
from qcodes.instrument_drivers.Keysight.M3201A import Keysight_M3201A
from qcodes_contrib_drivers.drivers.Keysight.Keysight_M3201A import Keysight_M3201A
Keysight_M3201A_found = True
except ImportError:
Keysight_M3201A_found = False
try:
from qcodes.instrument_drivers.Keysight.M3300A import M3300A_AWG
from qcodes_contrib_drivers.drivers.Keysight.Keysight_M3300A import M3300A_AWG
M3300A_AWG_found = True
except ImportError:
M3300A_AWG_found = False
try:
from qcodes.instrument_drivers.Keysight.SD_common.SD_Module import SD_Module
from qcodes_contrib_drivers.drivers.Keysight.SD_common.SD_Module import SD_Module
SD_Module_found = True
except ImportError:
SD_Module_found = False
Expand Down

0 comments on commit e4b57ba

Please sign in to comment.