Skip to content

Commit

Permalink
flake8 bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Aug 7, 2023
1 parent d8b41dc commit 0fa5a6a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 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(type(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(type(data.value), int):
enc = 'tag:yaml.org,2002:int'
elif type(data.value) == float:
elif isinstance(type(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(type(value), bool) and enum is None:
self._enum = {False: 'False', True: 'True'}

if self._enum is not None:
Expand Down
1 change: 0 additions & 1 deletion python/pyrogue/interfaces/stream/_Fifo.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ def __rshift__(self,other):

def countReset(self):
self._fifo.clearCnt()

0 comments on commit 0fa5a6a

Please sign in to comment.