Python-Nova.novaextension
Python-Nova.novaextension copied to clipboard
pylint not working
On a fresh install on my M1 MacBook Pro running the latest version of Big Sur
pip3 install python-language-server
pip3 install python-language-server[all]
which pylint
/opt/homebrew/bin/pylint
which pyls
/opt/homebrew/bin/pyls
Configuration Page 1 (PyLS)
Configuration Page 2 (pylint):
After rebooting Nova I see the extension console:
Python[15:03:20.608000] pyls.plugins.pylint.enabled: true
Python[15:03:20.609000] pyls.plugins.pylint.args: null is null. Returning undefined
Python[15:03:20.609000] pyls.plugins.pylint.executable: /opt/homebrew/bin/pylint
Python[15:03:20.609000] pyls.plugins.pylint.enabled: true
For an arbitrary python file, example bills.py
in this current project I get the following output in the console:
mzagaja@MacBook-Pro ~/D/openstates-scrapers (main)> pylint scrapers/ct/bills.py
************* Module scrapers.ct.bills
scrapers/ct/bills.py:137:0: C0301: Line too long (102/100) (line-too-long)
scrapers/ct/bills.py:144:0: C0301: Line too long (103/100) (line-too-long)
scrapers/ct/bills.py:1:0: C0114: Missing module docstring (missing-module-docstring)
scrapers/ct/bills.py:6:0: E0401: Unable to import 'openstates.scrape' (import-error)
scrapers/ct/bills.py:9:0: E0401: Unable to import 'lxml.html' (import-error)
scrapers/ct/bills.py:12:0: C0115: Missing class docstring (missing-class-docstring)
scrapers/ct/bills.py:16:0: C0115: Missing class docstring (missing-class-docstring)
scrapers/ct/bills.py:19:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:40:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:94:16: W0107: Unnecessary pass statement (unnecessary-pass)
scrapers/ct/bills.py:96:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:154:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:154:4: R0914: Too many local variables (19/15) (too-many-locals)
scrapers/ct/bills.py:224:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:224:4: R0912: Too many branches (18/12) (too-many-branches)
scrapers/ct/bills.py:305:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:312:12: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
scrapers/ct/bills.py:329:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:337:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:348:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:363:4: C0116: Missing function or method docstring (missing-function-docstring)
scrapers/ct/bills.py:24:8: W0201: Attribute 'bills' defined outside __init__ (attribute-defined-outside-init)
scrapers/ct/bills.py:25:8: W0201: Attribute '_committee_names' defined outside __init__ (attribute-defined-outside-init)
scrapers/ct/bills.py:26:8: W0201: Attribute '_introducers' defined outside __init__ (attribute-defined-outside-init)
scrapers/ct/bills.py:27:8: W0201: Attribute '_subjects' defined outside __init__ (attribute-defined-outside-init)
scrapers/ct/bills.py:9:0: C0411: third party import "import lxml.html" should be placed before "from .utils import parse_directory_listing, open_csv" (wrong-import-order)
------------------------------------------------------------------
But this screenshot shows the lint issues above don't appear in the Nova issues page: