-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature request: support Cython and Jupyter magic? #1079
Comments
Cython I don't have much experience with so can't commit to anything on that front right now. Jupyter integration though is very interesting to me and something I'd like to support! |
Hey, I don't know how to use rust, but I've done some relevant work here on the Python side For Cython, you might be interested in https://github.com/MarcoGorelli/cython-lint (which does everything flake8 used to, plus more) and seeing if that's portable to rust? For Jupyter, I contributed its support to |
Amazing, thank you @MarcoGorelli -- that's super helpful. I'll probably just port that file to Rust then. |
Ruff was actually integrated into nbQA in the latest release, so you can now run (e.g.):
Super cool :) (Would still like to have a first-party integration at some point.) |
(2) is being worked on (see #5030) |
@charliermarsh On the Cython side it's worth noting that isort supports Cython as of isort 5.0.0 so you may also be able to port those features over to rust (in the same way that you're hoping to port @MarcoGorelli's excellent cython-lint project). Between cython-lint and isort support I would probably consider that enough to claim Cython support, especially since flake8's support has always been patchy and incidental (prior to the change last year that disabled it entirely, necessitating flake8-force) and I believe the same is true for pylint. Just in case you were curious where to set the goalposts for this issue 😃 This might also be a strong argument for #283, though, and in particular supporting Python plugins alongside Rust plugins. Cython is a prime example of a case where the ruff developers may not have the expertise or interest in maintaining their own solution, but could happily delegate to a plugin author who doesn't have Rust experience but is willing to write one in Python. Great work on ruff, by the way! Definitely a fan of ruff. |
@dhruvmanila do we support this now that we support ipython magics? |
@MichaReiser Yes, we support (2) but not (1). I'm not familiar with Cython so can't say what will be required to support it. |
@9r0x could you help us understand what features you would expect from a linter supporting cpython? Is it Cython specific lint rules or is it something else? |
Cython is a superset of Python. So at minimum it would require a different parser. Lets close this and create a new issue to track Cython, since there are really two independent requests here. |
Done, #10250 |
Hi,
I was wondering if we could consider Cython support and/or Jupiter magic because
Thanks
The text was updated successfully, but these errors were encountered: