Skip to content

Commit

Permalink
Merge pull request #165 from jenshnielsen/fix_mypy_type_check
Browse files Browse the repository at this point in the history
Fix mypy type check
  • Loading branch information
jenshnielsen committed Oct 5, 2022
2 parents 80256ad + 7cf228b commit b8a7d23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ module = [
"py_header.*",
"pyspcm",
"spirack",
"zhinst.*"
"zhinst.*",
"ruamel.*"
]
ignore_missing_imports = true

Expand Down
6 changes: 5 additions & 1 deletion qcodes_contrib_drivers/drivers/SignalCore/SignalCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ def __init__(self, name: str,
self.connect_message()

def _open(self) -> None:
self._handle = ctypes.wintypes.HANDLE()
if sys.platform == "win32":
self._handle = ctypes.wintypes.HANDLE()
else:
raise EnvironmentError(f"{self.__class__.__name__} is supported only on Windows platform")

self._dll.sc5520a_uhfsOpenDevice(COMMINTERFACE, self.buffer_pointer_array[0], ctypes.c_uint8(1), ctypes.byref(self._handle))

def _close(self) -> None:
Expand Down

0 comments on commit b8a7d23

Please sign in to comment.