Skip to content

Commit 5d9d461

Browse files
committed
Enable check_untyped_defs in mypy
1 parent 34d1db5 commit 5d9d461

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

capi_janitor/openstack/operator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,8 @@ async def wrapper(**kwargs):
319319
# Calculate the backoff
320320
backoff = RETRY_DEFAULT_DELAY
321321
# Wait for the backoff before annotating the resource
322+
if backoff is None:
323+
backoff = RETRY_DEFAULT_DELAY
322324
await asyncio.sleep(backoff)
323325
# Annotate the object with a random value to trigger another event
324326
try:

capi_janitor/tests/openstack/test_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def test_operator(self):
1515
mock_easykube = mock.AsyncMock(spec=easykube.AsyncClient)
1616
operator.ekclient = mock_easykube
1717

18-
await operator.on_cleanup()
18+
await operator.on_cleanup() # type: ignore
1919

2020
mock_easykube.aclose.assert_awaited_once_with()
2121

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,4 @@ select = [
4040
follow_imports = "silent"
4141
warn_redundant_casts = true
4242
warn_unused_ignores = true
43-
# add these later?
44-
# check_untyped_defs = true
45-
# disallow_untyped_defs = true
43+
check_untyped_defs = true

0 commit comments

Comments
 (0)