Skip to content
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

Unify default values of arguments for all snapshot_base and snapshot methods in qcodes repo #1830

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qcodes/instrument/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def lock(self) -> None:
self._channels = tuple(self._channels)
self._locked = True

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
"""
Expand Down
4 changes: 2 additions & 2 deletions qcodes/instrument/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def __call__(self, *args: Any, **kwargs: Any) -> Optional[ParamDataType]:
raise NotImplementedError('no set cmd found in' +
' Parameter {}'.format(self.name))

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
"""
Expand Down Expand Up @@ -1333,7 +1333,7 @@ def get_raw(self) -> Any:
def set_raw(self, value: Any) -> None:
self.source(value)

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
snapshot = super().snapshot_base(
Expand Down
2 changes: 1 addition & 1 deletion qcodes/instrument/visa.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def ask_raw(self, cmd: str) -> str:
self.visa_log.debug(f"Response: {response}")
return response

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
"""
Expand Down
2 changes: 1 addition & 1 deletion qcodes/instrument_drivers/ZI/ZIHDAWG8.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, name: str, device_id: str, **kwargs) -> None:
self.warnings_as_errors: List[str] = []
self._compiler_sleep_time = 0.01

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
""" Override the base method to ignore 'feature_code' by default."""
Expand Down
2 changes: 1 addition & 1 deletion qcodes/instrument_drivers/ZI/ZIUHFLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ def __init__(self, name: str, device_ID: str, **kwargs) -> None:
docstring="Enable jumbo frames on the TCP/IP interface"
)

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
""" Override the base method to ignore 'sweeper_sweeptime' if no signals selected."""
Expand Down
4 changes: 2 additions & 2 deletions qcodes/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __init__(self, *components: Metadatable,

self.load_config_file(self.config_file)

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
"""
Expand Down Expand Up @@ -361,7 +361,7 @@ def load_config(self, config: Union[str, IO[AnyStr]]) -> None:

def update_station_configuration_snapshot():
class StationConfig(UserDict):
def snapshot(self, update=True):
def snapshot(self, update=False):
return self

self.components['config'] = StationConfig(self._config)
Expand Down
2 changes: 1 addition & 1 deletion qcodes/tests/instrument_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def _getter(self, name: str):
self._get_calls[name] += 1
return val

def snapshot_base(self, update: bool = True,
def snapshot_base(self, update: bool = False,
params_to_skip_update: Optional[Sequence[str]] = None
) -> Dict:
if params_to_skip_update is None:
Expand Down