-
Notifications
You must be signed in to change notification settings - Fork 86
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
Andor CCD DU401 driver #32
Conversation
@lankes-fzj see commit e8344e0 about |
…Andor_DU401 # Conflicts: # qcodes_contrib_drivers/drivers/Andor/DU401.py
I am not sure but I suggest that you just put an |
But then the tests would fail on linux, wouldn't they? |
Which tests? As documented in the link above this will make mypy stop doing any cheking of that file on platforms that are not windows. As far as I can see there are no other tests for this at the moment |
Sorry that fails the docs build as it cannot import the code :( The best workaround that I can come up with is to explicitly annotate self.dll as Any on Windows platforms. I think the following will work (even if its a bit strange) from typing import Dict, List, Optional, Tuple, Any
...
def __init__(self, dll_path: Optional[str] = None, verbose: bool = False):
if sys.platform != 'win32':
self.dll: Any = None
raise OSError("\"atmcd64d\" is only compatible with Microsoft Windows")
else:
self.verbose = verbose
self.dll = ctypes.windll.LoadLibrary(dll_path or self._dll_path) Edited to change from cdll to None with Any type |
@jenshnielsen Thank you very much for your help :) |
New driver for 'Andor CCD DU401'
(based on SvenBo90/Qcodes@2cff137)