diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-02-04 23:36:49 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-02-04 23:36:49 -0500 |
commit | d812fbc4d6dbd31c643caf4f8561f47ee8cb58aa (patch) | |
tree | cf4e4e3440fce1c98084d31e05194fe4265cdf9a /cmd2/utils.py | |
parent | ed83f7cfedfdcf8620e0feb9a8c6b98cd69dda16 (diff) | |
download | cmd2-git-d812fbc4d6dbd31c643caf4f8561f47ee8cb58aa.tar.gz |
Removed unnecessary inheritance from object
Diffstat (limited to 'cmd2/utils.py')
-rw-r--r-- | cmd2/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd2/utils.py b/cmd2/utils.py index c200085a..ee53e924 100644 --- a/cmd2/utils.py +++ b/cmd2/utils.py @@ -388,7 +388,7 @@ def get_exes_in_path(starts_with: str) -> List[str]: return list(exes_set) -class StdSim(object): +class StdSim: """ Class to simulate behavior of sys.stdout or sys.stderr. Stores contents in internal buffer and optionally echos to the inner stream it is simulating. @@ -468,7 +468,7 @@ class StdSim(object): return getattr(self.inner_stream, item) -class ByteBuf(object): +class ByteBuf: """ Used by StdSim to write binary data and stores the actual bytes written """ @@ -497,7 +497,7 @@ class ByteBuf(object): self.std_sim_instance.flush() -class ProcReader(object): +class ProcReader: """ Used to capture stdout and stderr from a Popen process if any of those were set to subprocess.PIPE. If neither are pipes, then the process will run normally and no output will be captured. @@ -599,7 +599,7 @@ class ProcReader(object): pass -class ContextFlag(object): +class ContextFlag: """A context manager which is also used as a boolean flag value within the default sigint handler. Its main use is as a flag to prevent the SIGINT handler in cmd2 from raising a KeyboardInterrupt @@ -623,7 +623,7 @@ class ContextFlag(object): raise ValueError("count has gone below 0") -class RedirectionSavedState(object): +class RedirectionSavedState: """Created by each command to store information about their redirection.""" def __init__(self, self_stdout: Union[StdSim, TextIO], sys_stdout: Union[StdSim, TextIO], |