question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Toggling docstring style linting in preferences doesn't work in macOS

See original GitHub issue

Problem Description

Unchecking “enable docstring style linting” in settings doesn’t seem to have any effect

What steps reproduce the problem?

  1. Open spyder with docstring style linting enabled
  2. Uncheck enable docstring style linting radio box
  3. Click Apply and/or OK

What is the expected output? What do you see instead?

I expect the warning icons for docstrings to disappear. Instead they remain and opening the preference again shows the radio box still clicked. Can disable by closing spyder and manually changing pydocstyle = True to False in spyder.ini file.

Versions

  • Spyder version: 4.0.0b2
  • Python version: 3.7.0 64-bit
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: Darwin 18.6.0

Dependencies

pygments >=2.0     :  2.4.0 (OK)
qdarkstyle >=2.6.4 :  2.6.8 (OK)
sphinx >=0.6.6     :  2.0.1 (OK)
psutil >=0.3       :  5.6.2 (OK)
pyls >=0.19.0;<0.25:  0.24.0 (OK)
nbconvert >=4.0    :  5.5.0 (OK)
pandas >=0.13.1    :  0.24.2 (OK)
numpy >=1.7        :  1.16.4 (OK)
sympy >=0.7.3      :  1.4 (OK)
cython >=0.21      :  0.29.8 (OK)
qtconsole >=4.2.0  :  4.5.1 (OK)
IPython >=4.0      :  7.5.0 (OK)
matplotlib >=2.0.0 :  3.1.0 (OK)
pylint >=0.25      :  2.3.1 (OK)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
goanpecacommented, Jun 20, 2019

@steff456 please see https://github.com/spyder-ide/spyder/blob/master/spyder/preferences/configdialog.py#L313

            if not API == 'pyside':
                checkbox.clicked.connect(lambda _foo, opt=option:
                                         self.has_been_modified(opt))
            else:
                checkbox.clicked.connect(lambda opt=option:
                                         self.has_been_modified(opt))

It seems that on PyQt 5.9 for OSX (need to check with 5.12 and pip, could you do this @steff456 ?) this distiction is no longer needed

If I change to

            if not API == 'pyside':
                checkbox.clicked.connect(lambda opt=option:
                                         self.has_been_modified(opt))
            else:
                checkbox.clicked.connect(lambda opt=option:
                                         self.has_been_modified(opt))

It works as expected.

If this is the case then ALL the checkboxes on the preferences with PyQt5 and OSX are broken.

Maybe we now need to add another if to check if it is Darwin. I am not sure whye PyQt5 would work differently on this case.

Thoughts @ccordoba12 ?

0reactions
ccordoba12commented, Jun 21, 2019

Those checks can be safely removed, I think. I added them several years ago for PyQt4, so I’m not surprised they are not working anymore for PyQt5.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linting Python in Visual Studio Code
To enable linters, open the Command Palette (Ctrl+Shift+P) ; You can easily toggle between enabling and disabling your linter. To switch, open the...
Read more >
Disabling and enabling inspections | PyCharm Documentation
In the Settings/Preferences dialog ( Ctrl+Alt+S ), select to Editor | Inspections. You can also press Ctrl+Alt+Shift+H and select Configure Inspections. Locate ...
Read more >
How do I disable "missing docstring" warnings at a file-level in ...
Ctrl + Shift + P · Then type and click on > preferences:configure language specific settings · and then type "python" after that....
Read more >
Advanced Visual Studio Code for Python Developers
To enable linting, choose a linter by running Python: Select Linter on the Command Palette. You can also enable one or more linters...
Read more >
Documentation Style Guide - GitLab Docs
gitlab-ci.yml without backticks fails markdownlint because it does not have capital G or L. “Run git clone to clone a Git repository…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found