Skip to content

Commit afd10b3

Browse files
committed
Simplified code
1 parent c480f3a commit afd10b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd2/pyscript_bridge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __bool__(self) -> bool:
3838

3939
# If data has a __bool__ method, then call it to determine success of command
4040
if self.data is not None and callable(getattr(self.data, '__bool__', None)):
41-
return True if self.data else False
41+
return bool(self.data)
4242

4343
# Otherwise check if stderr was filled out
4444
else:

0 commit comments

Comments
 (0)