Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mypy better missing imports #143

Merged
merged 2 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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