Closed thangleiter closed 1 year ago
also a few typing errors to fix, see here https://github.com/QCoDeS/Qcodes_contrib_drivers/actions/runs/6561129954/job/17820255378?pr=261
thanks for the contribution!
also a few typing errors to fix, see here https://github.com/QCoDeS/Qcodes_contrib_drivers/actions/runs/6561129954/job/17820255378?pr=261
I'd appreciate if you could help me out with some of those since I don't have a lot of experience with mypy.
ctypes.byref
doesn't accept TypeVar
s? I can't come up with another solution than to drop the hint altogether.tqdm
are not installed. Is there another way around this?classmethod
and property
decorators apparently has been deprecated in Python. Any suggestions for how instead to enforce an abstract attribute that subclasses need to implement? I also used this in #262 :)msl.loadlib
you can add to pyproject.toml
to tool.mypy.overrides
section here https://github.com/QCoDeS/Qcodes_contrib_drivers/blob/3c10e0759c910077c159e4f79c508dab061fb34f/pyproject.toml#L66-L78types-tqdm>=4.64.6
can be added to pyproject.toml
in project.optional-dependencies
[test]
targetqcodes_contrib_drivers/drivers/M2/M2_Solstis_3.py:142:37: error: X | Y syntax for unions requires Python 3.10 [syntax]
to sovle this you could add from __future__ import annotations
at the top of the module
qcodes_contrib_drivers/drivers/Thermotek/Thermotek_T255p.py:5:1: error: Module "typing" has no attribute "ParamSpec"; maybe "_ParamSpec"? [attr-defined]
to solve this, i don't remember, but perhaps the minimum version of typing_extensions needs to be bumped or so.
@thangleiter instead of https://github.com/QCoDeS/Qcodes_contrib_drivers/commit/83b844be743afbf2b410cf9d63df400be9168ee4 you could add this module to autodoc mock imports like here https://github.com/QCoDeS/Qcodes/blob/main/docs/conf.py#L439
Mypy finally runs without errors locally on 3.9.
Merging #261 (d601bc2) into main (3c10e07) will decrease coverage by
0.54%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## main #261 +/- ##
==========================================
- Coverage 20.17% 19.64% -0.54%
==========================================
Files 146 153 +7
Lines 18260 18756 +496
==========================================
Hits 3684 3684
- Misses 14576 15072 +496
Files | Coverage Δ | |
---|---|---|
qcodes_contrib_drivers/drivers/Horiba/__init__.py | 0.00% <0.00%> (ø) |
|
...ntrib_drivers/drivers/Horiba/private/fhr_client.py | 0.00% <0.00%> (ø) |
|
...ntrib_drivers/drivers/Horiba/private/fhr_server.py | 0.00% <0.00%> (ø) |
|
...ghthousePhotonics/Lighthouse_Photonics_Sprout_G.py | 0.00% <0.00%> (ø) |
|
qcodes_contrib_drivers/drivers/M2/M2_Solstis_3.py | 0.00% <0.00%> (ø) |
|
...ntrib_drivers/drivers/Thermotek/Thermotek_T255p.py | 0.00% <0.00%> (ø) |
|
...codes_contrib_drivers/drivers/Horiba/Horiba_FHR.py | 0.00% <0.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
... Docs should also be fixed now!
I am finally tackling our driver backlog. Some of these are likely to be of limited broad appeal, so let me know if adding them is out of scope for the main repo.
If desired I can split up the PR into one for each new driver.