Repository navigation
Add markdown to types_or - #159
Merged
Merged
Conversation
Member
|
Thank you. I think we should wait until the feature is out of preview before changing our defaults. |
Contributor
|
Could you update the |
Contributor
|
It came out of preview! https://astral.sh/blog/ruff-v0.16.0 |
ntBre
reviewed
Jul 24, 2026
ntBre
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Looks straightforward to me, I just suggested dropping markdown from the linter invocation. Could you also add it to the README as suggested by the comments?
Happy to handle it if you'd prefer, I know it has been a long time :)
|
@ntBre This has been stale for a while now, could you apply the suggestion and merge? |
ntBre
reviewed
Aug 25, 2026
ntBre
approved these changes
Aug 25, 2026
Contributor
|
Yep, thanks for the reminder! |
ntBre
added a commit
to astral-sh/ruff
that referenced
this pull request
Aug 28, 2026
…28112) Summary -- This PR updates our ruff-pre-commit dependency to 0.16.5, which supports the new category selectors, and then enables `lint.preview` and the new default categories so that we can dogfood them on our code. There were 66 diagnostics initially, which I also fixed or ignored: ``` 28 FURB113 [ ] repeated-append 12 ASYNC240 [ ] blocking-path-method-in-async-function 6 RUF105 [*] noqa-comments 5 PLW1510 [ ] subprocess-run-without-check 3 PLW0108 [ ] unnecessary-lambda 2 EXE001 [ ] shebang-not-executable 2 RUF039 [*] unraw-re-pattern 1 B024 [ ] abstract-base-class-without-abstract-method 1 FURB142 [*] for-loop-set-mutations 1 PERF102 [ ] incorrect-dict-iterator 1 PLC0207 [*] missing-maxsplit-arg 1 PLW0127 [ ] self-assigning-variable 1 TRY004 [ ] type-check-without-type-error 1 PLW0120 [*] useless-else-on-loop 1 TRY201 [ ] verbose-raise ``` Of these, I ignored `repeated-append` and `blocking-path-method-in-async-function`. I think they are still reasonable defaults, just less useful/important in our uses. 0.16.5 also includes astral-sh/ruff-pre-commit#159, so I removed `markdown` from our main `ruff-format` hook, leaving it for the later mdtest formatting stage. I also had to make a few changes related to config discovery in tests: - move our cached ecosystem checkouts to `$RUNNER_TEMP` instead of inside of our checkout - convert some CLI tests to use the `CliTest` helpers - add `configurationPreference: editorOnly` to some notebook tests In these cases, our own Ruff settings were being inherited by test code. This likely affects many other tests, but I only updated the obviously failing ones for now. I'm least confident about the notebook tests, but as far as I can tell from the history (#11944, #22810), the specific diagnostics are not the important parts being asserted. Test Plan -- CI on this PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Now
*.mdfiles are intool.ruff.includeby default and may be used withtool.ruff.format.preview = True, etc.https://docs.astral.sh/ruff/settings/#include
astral-sh/ruff@4795eca#diff-959aaaf28345388cb476e91b1a8b127625bffba0ca2f8ed794f687bd27e50302
Test Plan