Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format_str() doesn't have line_length argument anymore #805

Closed
daureg opened this issue Apr 15, 2019 · 2 comments
Closed

format_str() doesn't have line_length argument anymore #805

daureg opened this issue Apr 15, 2019 · 2 comments
Labels
C: packaging Installation and packaging of Black

Comments

@daureg
Copy link

daureg commented Apr 15, 2019

Howdy! Sorry you're having trouble. To expedite your experience,
provide some basics for me:

Operating system: Linux
Python version: 3.7
Black version: 19.3b0
Does also happen on master: probably

commit 36d3c51 removed the line_length argument of format_str() but didn't update its documentation. It's also breaking the blackcellmagic jupyter notebook extension.

@JelleZijlstra JelleZijlstra added the C: packaging Installation and packaging of Black label May 5, 2019
@peterjc
Copy link

peterjc commented May 9, 2019

It wasn't just format_str() which lost the line_length argument, also format_file_contents() changed which broke my flake8 plugin:

peterjc/flake8-black#3
peterjc/flake8-black@d75a7e8

You now have to create a FileMode object, and that holds the line length (see my workaround, link above).

@ichard26
Copy link
Collaborator

Yeah, sorry about breaking the "public" API. We should start thinking about a documented abstract public API since Black is getting ever closer to its first stable release. Related: #779

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: packaging Installation and packaging of Black
Projects
None yet
Development

No branches or pull requests

5 participants