Skip to content

Commit 7848bd2

Browse files
DimitriPapadopoulosmattip
authored andcommitted
Apply ruff/flake8-simplify rule SIM103
SIM103 Return the condition directly
1 parent 4f21a64 commit 7848bd2

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

demo/_curses.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,7 @@ def is_linetouched(self, line):
513513
code = lib.is_linetouched(self._win, line)
514514
if code == lib.ERR:
515515
raise error("is_linetouched: line number outside of boundaries")
516-
if code == lib.FALSE:
517-
return False
518-
return True
516+
return code != lib.FALSE
519517

520518
def noutrefresh(self, *args):
521519
if lib._m_ispad(self._win):

0 commit comments

Comments
 (0)