Skip to content

Commit

Permalink
handle qcodes 0.30 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Nov 30, 2021
1 parent 311e527 commit 057a6b9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plottr/data/qcodes_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
__license__ = 'MIT'

if TYPE_CHECKING:
from qcodes.dataset.data_set import DataSet
try:
from qcodes.dataset import DataSetProtocol
except ImportError:
from qcodes.dataset.data_set import DataSet as DataSetProtocol
from qcodes import ParamSpec


Expand Down Expand Up @@ -68,7 +71,7 @@ class DataSetInfoDict(TypedDict):


def get_ds_structure(
ds: 'DataSet'
ds: 'DataSetProtocol'
) -> DataSetStructureDict:
"""
Return the structure of the dataset, i.e., a dictionary in the form
Expand Down Expand Up @@ -258,7 +261,7 @@ class QCodesDSLoader(Node):
def __init__(self, *arg: Any, **kw: Any):
self._pathAndId: Tuple[Optional[str], Optional[int]] = (None, None)
self.nLoadedRecords = 0
self._dataset: Optional[DataSet] = None
self._dataset: Optional[DataSetProtocol] = None

super().__init__(*arg, **kw)

Expand Down

0 comments on commit 057a6b9

Please sign in to comment.