Allow setting line length, when setting `black` as autoformatter
See original GitHub issueProblem Description
When setting black
as autoformatter, the line-length (and the vertical ruler) are set and fixed to 88
.
Related: #14082
What steps reproduce the problem?
- set
Preferences
->Completion and linting
->Code formatting
->Choose the code formatting provider
toblack
Preferences
->Completion and linting
->Code style
->Maximum allowed line length
is auto. set to88
- can’t change this
Maximum allowed line length
What is the expected output? What do you see instead?
Preset of 88
for black
is fine, but since black
provides the -l
option (link), the maximum line length should be changeable.
Versions
- Spyder version: 4.2.0
Dependencies
- black
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
VSCode: Setting line lengths in the Black Python code formatter
In VSCode, go 'Code -> Preferences -> Settings' and search for "python formatting black args".
Read more >In python, how to tweak Black formatter, if possible?
Black explains the --line-length setting in more detail here: ... Black defaults to 88 characters per line, which happens to be 10% over...
Read more >The Black code style - Black 22.12.0 documentation
Line length #. You probably noticed the peculiar default line length. Black defaults to 88 characters per line, which happens to be 10%...
Read more >Using Black To Auto Format Your Python | HackerNoon
Note that Black defaults to 88 characters for its line length, but you can change that using the “-l” or “- -line-length” option....
Read more >How to Auto-Format Your Python Code with Black
Change Number of Characters per Line. Note that Black defaults to 88 characters for its line length, but you can change that using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My apologies @ccordoba12 , and thanks so much for your efforts.
Hey @ccaprani, we’re aware this problem resurfaced again (see issue #14558). We’ll try to fix it in our next version (5.2.0), to be released at the end of September.