Add lots of type hints, fix some bugs, and clean up some code
Compare changes
- Newbyte authored
I think the "these types make no sense" comment were about output_return_buffer, which defaulted to False but was to be set to list[bytes] if used. I changed it so that it defaults to None, which probably is more conventional. Other than that I didn't notice anything weird about the types here. Also check for None as necessary to appease mypy.
+ 33
− 8
@@ -14,6 +14,7 @@ import sys
@@ -94,14 +95,33 @@ def pipe(cmd, working_dir=None):
@@ -115,13 +135,18 @@ def pipe_read(