Skip to content

Commit

Permalink
refactor: refactor unnecessary else / elif when if block has a …
Browse files Browse the repository at this point in the history
…`raise` statement

refactor: refactor unnecessary `else` / `elif` when `if` block has a `raise` statement
  • Loading branch information
itsHenry35 committed Dec 24, 2023
2 parents 1a068b6 + d213fbc commit d1a127b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gui/download2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _async_raise(tid, exctype):
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype))
if res == 0:
raise ValueError("invalid thread id")
elif res != 1:
if res != 1:
ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None)
raise SystemError("PyThreadState_SetAsyncExc failed")

Expand Down
2 changes: 1 addition & 1 deletion gui/login1_sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _async_raise(tid, exctype):
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype))
if res == 0:
raise ValueError("invalid thread id")
elif res != 1:
if res != 1:
ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None)


Expand Down

0 comments on commit d1a127b

Please sign in to comment.