-
Notifications
You must be signed in to change notification settings - Fork 1.6k
include .pyw files by default when linting and formatting
#20458
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
Conversation
- Adds a lint configuration snapshot with `--preview` enabled - Adds a simple integration test linting different file extensions
Updates the default configuration to include `*.pyw` file extensions.
|
.pyw files by default when linting and formatting.pyw files by default when linting and formatting
|
The basics here look good, but there are a few more places we have to account for One such place is It might also be good to do a quick search for ".py" (or "pyi" because there are fewer instances) to see if there are other places where we check for the extension that need updating. This is related to #13691 |
I tried looking through various places where this is used, but there really is an overwhelming number of places where it's used that I don't have context on, but what I've looked at so far usually seems reasonable. I went ahead and added the mapping to the existing That said, I'm also not sure what you mean by "module resolution logic", so if you can suggest specific crates/files to look at more closely, I'd be happy to dig further.
I did do that originally, though I searched for |
Yeah, same here. We don't need to study each line for a very long time. It's okay if we miss something. I only did a quick search. Most usages indeed do look good. The one I think we need to take a closer look is ruff/crates/ruff_linter/src/rules/flake8_no_pep420/rules/implicit_namespace_package.rs Lines 72 to 73 in b027926
because it tries to resemble python's module resolution at runtime. |
686fc35 to
1ebe12d
Compare
--previewenabled and disabled.INCLUDE_PREVIEWwith file patterns including*.pyw.INCLUDE_PREVIEW..pywfile.Closes #13246