diff options
author | Owen Williams <owilliams@mixxx.org> | 2020-06-10 14:11:25 -0400 |
---|---|---|
committer | Owen Williams <owilliams@mixxx.org> | 2020-06-10 14:11:25 -0400 |
commit | 54ce176ecdfabecef6c92e81854b4a8943007d4d (patch) | |
tree | 97fc99dc71852834f063af0b23d87708d151026f /tools | |
parent | 65698c9adf47ff020d4e2b6624799b94362af6c9 (diff) |
Fix line-length tool not coercing to string correctly
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/line_length.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/line_length.py b/tools/line_length.py index df9fb91e67..2c9161a7da 100755 --- a/tools/line_length.py +++ b/tools/line_length.py @@ -27,15 +27,13 @@ FileLines = typing.NamedTuple( def get_git_added_lines() -> LineGenerator: proc = subprocess.run( - ["git", "diff", "--cached", "--unified=0"], - capture_output=True, - text=True, + ["git", "diff", "--cached", "--unified=0"], capture_output=True ) proc.check_returncode() current_file = None current_lineno = None lines_left = 0 - for line in proc.stdout.splitlines(): + for line in str(proc.stdout).splitlines(): match_file = re.match(r"^\+\+\+ b/(.*)$", line) if match_file: current_file = match_file.group(1) |