Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pre-release' into rem_header
Browse files Browse the repository at this point in the history
  • Loading branch information
slacrherbst committed Aug 8, 2023
2 parents 759b180 + 62e41dc commit 3d38550
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python/pyrogue/_HelperFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,13 @@ def _var_representer(dumper, data):
-------
"""
if type(data.value) == bool:
if isinstance(data.value, bool):
enc = 'tag:yaml.org,2002:bool'
elif data.enum is not None:
enc = 'tag:yaml.org,2002:str'
elif type(data.value) == int:
elif isinstance(data.value, int):
enc = 'tag:yaml.org,2002:int'
elif type(data.value) == float:
elif isinstance(data.value, float):
enc = 'tag:yaml.org,2002:float'
else:
enc = 'tag:yaml.org,2002:str'
Expand Down
2 changes: 1 addition & 1 deletion python/pyrogue/_Variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def __init__(self, *,
self._enum = disp
elif isinstance(disp, list):
self._enum = {k:str(k) for k in disp}
elif type(value) == bool and enum is None:
elif isinstance(value, bool) and enum is None:
self._enum = {False: 'False', True: 'True'}

if self._enum is not None:
Expand Down

0 comments on commit 3d38550

Please sign in to comment.