Giter Site home page Giter Site logo

Comments (5)

krassowski avatar krassowski commented on June 12, 2024 2

Closing as python-lsp/python-lsp-ruff#59 was merged and I can confirm that latest versions of ruff and python-lsp-ruff work well with jupyterlab-lsp:

image

$ pip list | grep ruff
python-lsp-ruff                2.0.0
ruff                           0.1.6

from jupyterlab-lsp.

krassowski avatar krassowski commented on June 12, 2024

Thank for opening the issue! There are two problems:

  1. You have a typo, in the lines disabling pycodestyle and pyflakes, your code says pyls but it should be pylsp
  2. Recent versions of ruff do not work with jupyterlab-lsp because they sniff based on file extension rather than content; I would treat it as a bug in python-lsp-ruff rather than ruff itself, because in the LSP protocol language has a meaning but extension does not, so python-lsp-ruff should instruct ruff to expect a python file even if it comes with .ipynb suffix astral-sh/ruff#6847 (comment)

from jupyterlab-lsp.

krassowski avatar krassowski commented on June 12, 2024

My reading of the issue is that downgrading ruff to a version older than 0.0.285 should make it work for now (while you have 0.0.292).

from jupyterlab-lsp.

Martin15135215 avatar Martin15135215 commented on June 12, 2024

Thanks for the comprehensive answer:

  1. I did correct that typo and did restart Jupyter lab and did restart the kernel. However, there are still hints from pycodestyle. See image:

image

from jupyterlab-lsp.

Martin15135215 avatar Martin15135215 commented on June 12, 2024
  1. I updated my Pipfile:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
numpy = "~=1.24.4"
ifcopenshell = "*"
lark = "*"



[dev-packages]
jupyterlab = "*"
jupyterlab-quarto = "*"
jupyterlab-lsp = "*"
nbqa = "*"
pylsp-mypy = "*"
nbdev = "*"
black = "*"
python-lsp-ruff = "==1.5.3"
ruff = "==0.0.284"

[requires]
python_version = "3.11"

Now there are hints in jupyter from ruff. However i am confused with this blog post here https://astral.sh/blog/ruff-v0.1.0#a-growing-feature-set with Jupyter notebook support. What about there lsp? See https://github.com/astral-sh/ruff-lsp

  1. Other question: How can i get mypy in jupyer running? I installed pylsp-mypy

from jupyterlab-lsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.