Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/sh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(self):
self.fd_lookup = {}
self.fo_lookup = {}

def __nonzero__(self):
def __bool__(self):
return len(self.fd_lookup) != 0

def __len__(self):
Expand Down Expand Up @@ -194,7 +194,7 @@ def __init__(self):
self.wlist = []
self.xlist = []

def __nonzero__(self):
def __bool__(self):
return len(self.rlist) + len(self.wlist) + len(self.xlist) != 0

def __len__(self):
Expand Down Expand Up @@ -978,9 +978,6 @@ def __repr__(self):
return repr(self.stdout)
return repr("")

def __long__(self):
return int(str(self).strip())

def __float__(self):
return float(str(self).strip())

Expand Down
1 change: 0 additions & 1 deletion src/sh/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ class RunningCommand(str):
def signal_group(self, sig: int) -> None: ...
def __int__(self) -> int: ...
def __float__(self) -> float: ...
def __long__(self) -> int: ...
def __await__(self) -> Generator[Any, None, RunningCommand]: ...
def __aiter__(self) -> AsyncIterator[str]: ...
def __enter__(self) -> None: ...
Expand Down
Loading