Skip to content
Snippets Groups Projects
Commit 77da1376 authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Strip newlines when determining Black version to avoid "requires black >=...

Strip newlines when determining Black version to avoid "requires black >= 20.8b1 (18.9b0\n detected)" in test output.
parent 6913a10e
No related branches found
No related tags found
No related merge requests found
......@@ -238,7 +238,7 @@ def black_version():
out = subprocess.check_output(("black", "--version"))
except subprocess.CalledProcessError as e:
out = e.output
return out.decode("utf-8").rsplit(" ", 1)[-1]
return out.strip().decode("utf-8").rsplit(" ", 1)[-1]
@skip_unless_tool_is_at_least("black", black_version, "20.8b1")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment