Skip to content

Commit

Permalink
used more f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rbudhrani committed May 27, 2024
1 parent c7565d1 commit 9e8e801
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qmi/instruments/zurich_instruments/hdawg.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _get_dev_int(self, node_path: str) -> int:
node_path: Path in the device tree, relative to the "/devNNNN/" subtree.
"""
self._check_data_server_exists()
return self._daq_server.getInt("/" + self._device_name + "/" + node_path)
return self._daq_server.getInt(f"/{self._device_name}/{node_path}")

def _get_dev_double(self, node_path: str) -> float:
"""Return a floating point value from the device node tree.
Expand All @@ -245,7 +245,7 @@ def _get_dev_double(self, node_path: str) -> float:
node_path: Path in the device tree, relative to the "/devNNNN/" subtree.
"""
self._check_data_server_exists()
return self._daq_server.getDouble("/" + self._device_name + "/" + node_path)
return self._daq_server.getDouble(f"/{self._device_name}/{node_path}")

@staticmethod
def _process_parameter_replacements(
Expand Down Expand Up @@ -334,7 +334,7 @@ def _wait_compile(self, sequencer_program: str) -> CompilerStatus:
compilation_status = CompilerStatus(self._awg_module.getInt(self.AWG_COMPILER_STATUS))
while compilation_status == CompilerStatus.IDLE:
time.sleep(0.1)
compilation_status = CompilerStatus(self._awg_module.getInt("awgModule/compiler/status"))
compilation_status = CompilerStatus(self._awg_module.getInt(self.AWG_COMPILER_STATUS))
if time.monotonic() - compilation_start_time > _COMPILE_TIMEOUT:
raise RuntimeError("Compilation process timed out (timeout={})".format(_COMPILE_TIMEOUT))
compilation_end_time = time.monotonic()
Expand Down

0 comments on commit 9e8e801

Please sign in to comment.