Closed peterjc closed 5 years ago
Its a big commit so may not render nicely on GitHub:
https://github.com/ambv/black/commit/36d3c516d3c09fc5f05c420900dd6b854e3c8bbd
The raw patch view is clear enough:
https://github.com/ambv/black/commit/36d3c516d3c09fc5f05c420900dd6b854e3c8bbd.patch
@@ -596,11 +647,7 @@ def format_stdin_to_stdout(
def format_file_contents(
- src_contents: str,
- *,
- line_length: int,
- fast: bool,
- mode: FileMode = FileMode.AUTO_DETECT,
+ src_contents: str, *, fast: bool, mode: FileMode
) -> FileContent:
"""Reformat contents a file and return new contents.
Must now pass in the line length via the mode argument, an instance of the new FileMode
class.
Short term solution is pip install black==18.9b0
(the previous release on PyPI).
Fixed in v0.0.4, now on PyPI
Just seen on a TravisCI run for code which passed locally,
https://travis-ci.org/peterjc/thapbi-pict/builds/506882383
Looks like a side effect from black 19.3b0, or at least a recent version of black which removed this argument to the
format_file_contents
function.Update: Confirmed, new version of black broke this