Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CraigCallender
Copy link
Contributor

@CraigCallender CraigCallender commented Sep 19, 2025

Fixes #5979

Proposed Changes

The ruff tool supports *.py, *.pyi, and *.ipynb. This PR adds the last two file types to the ruff and ruff-format linters to allow these files to be checked in list_of_files mode.

Readiness Checklist

Author/Contributor

  • Add entry to the CHANGELOG listing the change and linking to the corresponding issue (if appropriate)
  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

@echoix
Copy link
Collaborator

echoix commented Sep 19, 2025

If you're willing, in a second PR, black also can do the same:

https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#include

(Plus the .py)

But, the install command needs to have the jupyter extra, so black== needs to be black[jupyter]==.

@CraigCallender
Copy link
Contributor Author

If you're willing, in a second PR, black also can do the same:

https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#include

(Plus the .py)

But, the install command needs to have the jupyter extra, so black== needs to be black[jupyter]==.

I'll do it in a separate PR, but I may not get to it before the next release. #dadlife

Thank you for all your guidance. I like being able to contribute back.

@echoix
Copy link
Collaborator

echoix commented Sep 19, 2025

Also, again, if you're willing, mypy takes .py and .pyi:

https://mypy.readthedocs.io/en/stable/command_line.html#specifying-what-to-type-check (see --exclude)

Maybe you could do all in one PR too, if you're willing

@echoix
Copy link
Collaborator

echoix commented Sep 19, 2025

Pylint discovers .pyi files normally since 3.1 https://pylint.readthedocs.io/en/stable/whatsnew/3/3.1/index.html

@echoix
Copy link
Collaborator

echoix commented Sep 19, 2025

Isort can have more, including cython:

https://pycqa.github.io/isort/docs/configuration/options.html#supported-extensions

Config default: ['pxd', 'py', 'pyi', 'pyx']

@echoix
Copy link
Collaborator

echoix commented Sep 19, 2025

@echoix echoix enabled auto-merge (squash) September 19, 2025 16:34
@echoix echoix merged commit 74557e2 into oxsecurity:main Sep 19, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

ipynb Files Don't Trigger Python Linting in list_of_files mode

2 participants