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

Black maximum allowed line length is not working. #14558

Closed
mindnect opened this issue Jan 9, 2021 · 4 comments
Closed

Black maximum allowed line length is not working. #14558

mindnect opened this issue Jan 9, 2021 · 4 comments
Assignees
Labels
Milestone

Comments

@mindnect
Copy link

mindnect commented Jan 9, 2021

Problem Description

It seems that black isn't following maximum allowed line length option.
Is there a way to change the black option?

What steps reproduce the problem?

  1. Tools->Preferences->Completion and linting->Code Formatting->Choose the code formatting provider->black
  2. Tools->Preferences->Completion and linting->Code style and formatting->Line length->Change "Maximum allowed length" to 100->OK
  3. Source->Format file or seclection with Black

Versions

  • Spyder version: 4.2.0 None
  • Python version: 3.7.9 64-bit
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Windows 10

Dependencies

Mandatory:

atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 4.0.0 (OK)
cloudpickle >=0.5.0 : 1.6.0 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.1.0 (OK)
IPython >=4.0 : 7.19.0 (OK)
jedi =0.17.2 : 0.17.2 (OK)
jsonschema >=3.2.0 : 3.2.0 (OK)
nbconvert >=4.0 : 6.0.7 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
paramiko >=2.4.0 : 2.7.2 (OK)
parso =0.7.0 : 0.7.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.7.2 (OK)
pygments >=2.0 : 2.7.3 (OK)
pylint >=1.0 : 2.6.0 (OK)
pyls >=0.36.1;<1.0.0 : 0.36.2 (OK)
pyls_black >=0.4.6 : 0.4.6 (OK)
pyls_spyder >=0.1.1 : 0.3.0 (OK)
qdarkstyle >=2.8 : 2.8.1 (OK)
qtawesome >=0.5.7 : 1.0.1 (OK)
qtconsole >=4.7.7 : 4.7.7 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.8.3 : 0.9.4 (OK)
setuptools >=39.0.0 : 51.0.0.post20201207 (OK)
sphinx >=0.6.6 : 3.4.3 (OK)
spyder_kernels >=1.10.0;<1.11.0 : 1.10.1 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 0.10.4 (OK)
zmq >=17 : 20.0.0 (OK)

Optional:

cython >=0.21 : None (NOK)
matplotlib >=2.0.0 : 3.3.2 (OK)
numpy >=1.7 : 1.19.2 (OK)
pandas >=1.1.1 : 1.1.5 (OK)
scipy >=0.17.0 : 1.5.2 (OK)
sympy >=0.7.3 : None (NOK)

@juanis2112
Copy link
Contributor

Hi @mindnect thanks for opening this. I can successfully reproduce this error. We will fix it for 4.2.2!
Please @steff456 take care of this one.

@juanis2112 juanis2112 assigned steff456 and unassigned juanis2112 Jan 11, 2021
@juanis2112 juanis2112 added this to the v4.2.2 milestone Jan 11, 2021
@ccordoba12 ccordoba12 modified the milestones: v4.2.2, 4.x (missing) Feb 1, 2021
@edbeeching
Copy link

Hello,

I was wondering when this issue might be resolved?

@juliangilbey
Copy link
Contributor

It seems that black is simply using its default value of 88.

@ccordoba12 ccordoba12 modified the milestones: 4.x, v5.1.1 Jul 24, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.1.1, v5.1.2 Aug 2, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.1.2, v5.2.0 Aug 11, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.2.0, v5.2.1 Nov 1, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.2.1, v5.2.2 Nov 26, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.2.1, v5.2.2 Dec 7, 2021
@akloss
Copy link

akloss commented Dec 7, 2021

To add to this, after updating to 5.2, it seems that autopep8 now also ignores the line length setting and goes for 88 characters :D

@ccordoba12 ccordoba12 modified the milestones: v5.2.2, v5.3.0 Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants