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

Show vertical line at maximum allowed line length does not respect max allowed line length at startup #14188

Closed
10 tasks done
mrclary opened this issue Nov 10, 2020 · 6 comments
Closed
10 tasks done

Comments

@mrclary
Copy link
Contributor

mrclary commented Nov 10, 2020

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

The vertical line indicating the maximum allowed line length does not respect the value in the preferences on startup.

What steps reproduce the problem?

  1. Change the vertical line location in the Editor by changing the max allowed line length in the Preferences.
  2. Notice that the vertical line changes position, as expected.
  3. Quit and reopen Spyder
  4. Notice that the vertical line in the Editor is again at 79; Preferences still indicates the previously entered maximum line length.

Versions

  • Spyder version: 4.3.0.dev0 b4c0fac (bootstrap)
  • Python version: 3.7.9 64-bit
  • Qt version: 5.9.6
  • PyQt5 version: 5.9.2
  • Operating System: Darwin 19.6.0
@mrclary
Copy link
Contributor Author

mrclary commented Nov 10, 2020

Tangentially, is it possible to have the vertical line in the Editor use the maximum allowed line length from a relevant pycodestyle.cfg file? I.e. linting already uses these files to appropriately analyze code style, including max_line_length; it would make sense to use this value to override the value in Preferences.

@steff456
Copy link
Member

Hi @mrclary, I can reproduce this error, we will work in this because there's something weird happening with that preference setting

@urob
Copy link

urob commented Jan 31, 2021

I am having the same issue. One observation: it seems that the setting is actually correctly used by the code style linter. For instance, if line length is set to 88, then the linter doesn't show a warning for lines between 80 and 87 characters. Only the location of the vertical line is off.

@Cuahchic
Copy link

I can confirm this issue still persists in 5.0.3. If I go into settings and change it the line will move, but at startup it's incorrect.

@ccordoba12 ccordoba12 modified the milestones: v5.1.0, v5.0.4 May 23, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.1.0, 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
@joooeey
Copy link

joooeey commented Sep 17, 2021

I just noticed that when I change the max allowed line length in the settings, the vertical line only changes in the active panel. In other open panels it stays at 79 characters.

@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
Copy link
Member

I just noticed that when I change the max allowed line length in the settings, the vertical line only changes in the active panel. In other open panels it stays at 79 characters.

Hey @joooeey, thanks for mentioning this! I'll fix it as part of this issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants