Skip to content

Commit 062bcf6

Browse files
committed
Merge branch 'mr/fix_RET505_rule2' into 'master'
Fix RET505 rule See merge request it/e3-core!403
2 parents 416c386 + 86a542d commit 062bcf6

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/e3/os/windows/process.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def process_exit_code(handle: int) -> int | None:
3737
raise OSError(msg)
3838
if exit_code == ProcessInfo.STILL_ACTIVE:
3939
return None
40-
else:
41-
return exit_code
40+
return exit_code
4241

4342

4443
def wait_for_objects(
@@ -74,8 +73,8 @@ def wait_for_objects(
7473
raise OSError(msg)
7574
if Wait.ABANDONED <= object_index < Wait.ABANDONED + size: # defensive code
7675
return object_index - Wait.ABANDONED
77-
elif Wait.OBJECT <= object_index < Wait.OBJECT + size:
76+
if Wait.OBJECT <= object_index < Wait.OBJECT + size:
7877
return object_index
79-
else: # defensive code
80-
msg = "unknown error while waiting for objects"
81-
raise OSError(msg)
78+
# defensive code
79+
msg = "unknown error while waiting for objects"
80+
raise OSError(msg)

0 commit comments

Comments
 (0)