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

linter not working #1

Closed
contang0 opened this issue Jul 26, 2023 · 4 comments
Closed

linter not working #1

contang0 opened this issue Jul 26, 2023 · 4 comments

Comments

@contang0
Copy link

contang0 commented Jul 26, 2023

As mentioned here , the linter does not work with pulsar-ide-python. The only way I got it to work was by enabling both pulsar-ide-python and ide-python, using linter-ruff

I am on Pulsar 1.107.1, Windows 11, pyls v0.36.2, using the latest version of both ide-python and pulsar-ide-python.

I just disabled ide-python, left pulsar-ide-python enabled, and in dev tools I see the following error:

Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at sanitizeConfig (C:\Users\Julius\.pulsar\packages\pulsar-ide-python\lib\utils.js:60:10)
    at PythonLanguageClient.mapConfigurationObject (C:\Users\Julius\.pulsar\packages\pulsar-ide-python\lib\main.js:52:15)
    at C:\Users\Julius\.pulsar\packages\pulsar-ide-python\node_modules\atom-languageclient\build\lib\auto-languageclient.js:413:47
    at Config.observeKeyPath (C:\Users\Julius\AppData\Local\Temp\2KOMWC68y6grPtVY8hEDbLbDKhO\resources\app.asar\src\config.js:1134:5)
    at Config.observe (C:\Users\Julius\AppData\Local\Temp\2KOMWC68y6grPtVY8hEDbLbDKhO\resources\app.asar\src\config.js:517:19)
    at PythonLanguageClient.<anonymous> (C:\Users\Julius\.pulsar\packages\pulsar-ide-python\node_modules\atom-languageclient\build\lib\auto-languageclient.js:412:54)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Julius\.pulsar\packages\pulsar-ide-python\node_modules\atom-languageclient\build\lib\auto-languageclient.js:5:58)
@mjrodgers
Copy link
Owner

Okay, please test with the original ide-python and linter-ruff both disabled. Also you should uninstall pyls and try using the python-lsp-server (pylsp) instead of pyls, as it is actively maintained (and it also offers linting using ruff as a plugin for the lsp if that's what you prefer to use, you shouldn't need a separate Pulsar extension for this). Also, can you check the package settings? Which plugins are enabled?

Can you try this, and then we can see what is going on with the linting?

@mjrodgers
Copy link
Owner

I can confirm I have this issue also, the linting works on the 1.9.7 version but not the 1.10.1... I'll try to find the problem.

@mjrodgers
Copy link
Owner

Okay, I think I have the problem fixed in the newest version of pulsar-ide-python (1.10.3) (though I still recommend using pylsp instead of pyls). I see that while there is a ruff plugin for the pylsp server, I probably have to add some config options to make it available so i guess until I can get to that, linter-ruff is where to go if you want that (although in that case it will probably give duplicate warnings with pulsar-ide-python so you may want to disable some of those linters). thanks for reporting this, and please let me know if this doesn't fix the issue.

@contang0
Copy link
Author

Works fine now, thanks a lot! I have python-lsp-ruff enabled and linter-ruff disabled. It would be cool to have ruff options in the settings, however, the most canonical way of configuring it is the pyproject.toml file anyways.

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

No branches or pull requests

2 participants