Skip to content

Commit

Permalink
lint again
Browse files Browse the repository at this point in the history
  • Loading branch information
ihincks committed Apr 5, 2024
1 parent b001893 commit 15f2da4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qiskit_ibm_runtime/options/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ def _make_data_row(indent: int, name: str, value: Any, is_section: bool) -> Iter


def _iter_all_fields(
data_cls: Any, indent=0, dict_form=None
data_cls: Any, indent: int = 0, dict_form: Union[dict, None] = None
) -> Iterable[tuple[int, str, Any, bool]]:
"""Recursively iterate over a dataclass, yielding (indent, name, value, is_dataclass) fields."""
# we pass dict_form through recursion simply to avoid calling asdict() more than once
dict_form = dict_form or asdict(data_cls)

suboptions = []
for name, val in dict_form.items():
if is_dataclass(subopt := getattr(data_cls, name)):
Expand Down

0 comments on commit 15f2da4

Please sign in to comment.