Discover markdown files by default in preview mode#23434
Conversation
|
0a80e89 to
dc1b131
Compare
|
Oh does this mean you don't have to configure |
|
Yes, I'll include docs update before landing this. I'm looking at how it affects file discovery in the linter, and whether we should update wording/behavior or not. Micha was concerned that this could result in losing the "no python files found" message when linting with markdown files in the discovery path, even though we aren't linting markdown files, but also I'm not sure how much of a blocker that is for landing in preview mode. |
|
Oh right, I forgot there was more to it than the two line diff 😄 It seems okay to me to continue saying "no python files found" for the linter (less so for the formatter), but it also makes sense to check all the places this affects. I only briefly checked the references for |
|
Added a simple filter to the check CLI, and validated that it preserves the existing warning in preview mode, even if the directory/files to lint contains markdown files: Target dir contains markdown and unsupported TOML file: Add a python file: |
MichaReiser
left a comment
There was a problem hiding this comment.
We should more carefully review all call sites of python_files_in_path
51becbc to
70ecff6
Compare
* main: Update conformance suite commit hash (#23746) conformance.py: Collapse the summary paragraph when nothing changed (#23745) [ty] Make inferred specializations line up with source types more better (#23715) Bump 0.15.5 (#23743) [ty] Render all changed diagnostics in conformance.py (#23613) [ty] Split deferred checks out of `types/infer/builder.rs` (#23740) Discover markdown files by default in preview mode (#23434) [ty] Use `HasOptionalDefinition` for `except` handlers (#23739) [ty] Fix precedence of `all` selector in TOML configurations (#23723) [ty] Make `all` selector case sensitive (#23713) [ty] Add a diagnostic if a `TypeVar` is used to specialize a `ParamSpec`, or vice versa (#23738) [ty] Override home directory in ty tests (#23724) [ty] More type-variable default validation (#23639) [ty] Validate bare ParamSpec usage in type annotations, and support stringified ParamSpecs as the first argument to `Callable` (#23625) [ty] Add `all` selector to ty.json's `schema` (#23721) [ty] Add quotes to related issues links (#23720) [ty] Fix panic on incomplete except handlers (#23708)
Adds
*.mdto the list of default globs in preview mode.Adds a simple filter to the
checkCLI command to exclude file types that aren'tsupported for linting before checking if the set of resolved paths is empty, preserving
existing behavior of warning "No Python files found under the given path(s)" even if
there are markdown files present and preview mode is enabled.
Fixes #3792