Skip to content

Commit

Permalink
Fix unfixable ruff issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbarrett committed Jul 4, 2024
1 parent 8265f23 commit c386f6a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/cocotb/_xunit_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def indent(self, elem, level=0):
elem.text = i + " "
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in elem:
self.indent(elem, level + 1)
if not elem.tail or not elem.tail.strip():
elem.tail = i
for sub_elem in elem:
self.indent(sub_elem, level + 1)
if not sub_elem.tail or not sub_elem.tail.strip():
sub_elem.tail = i
elif level and (not elem.tail or not elem.tail.strip()):
elem.tail = i

Expand Down
4 changes: 2 additions & 2 deletions tests/test_cases/test_cocotb/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ async def test_create_task(_):
async def coro():
pass

assert type(cocotb.create_task(coro())) == Task
assert type(cocotb.create_task(coro())) is Task

# proper construction from Coroutine objects
class CoroType(Coroutine):
Expand All @@ -737,7 +737,7 @@ def close(self):
def __await__(self):
yield from self._coro.__await__()

assert type(cocotb.create_task(CoroType())) == Task
assert type(cocotb.create_task(CoroType())) is Task

# fail if given async generators
async def agen():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def test_lock_release_without_acquire(_):


@cocotb.test()
async def test_lock_repr(_):
async def test_lock_repr(dut):
lock = Lock()

assert re.match(r"<Lock \[0 waiting\] at \w+>", repr(lock))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cases/test_seed/test_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


@cocotb.test()
async def test_first(_):
async def test_first(dut):
# move generator to test that it doesn't affect the next test
for _ in range(100):
random.getrandbits(64)
Expand Down

0 comments on commit c386f6a

Please sign in to comment.