Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/hardware/blissdata/helpers.py: 11%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.5, created at 2024-11-15 02:12 +0000

1def get_scan_key(scan): 

2 import bliss.release 

3 from packaging.version import Version 

4 

5 if Version(bliss.release.version) < Version("2.0.dev"): 

6 return scan.node.db_name 

7 else: 

8 from bliss.scanning.group import Sequence 

9 

10 # Legacy `Sequence` has none standard interface 

11 if isinstance(scan, Sequence): 

12 return scan.scan._scan_data.key 

13 return scan._scan_data.key