Skip to content

[ty] Move ruffen-docs formatting config to a ruff.toml config file#24074

Merged
AlexWaygood merged 1 commit intomainfrom
alex/mdtest-formatting-config
Mar 20, 2026
Merged

[ty] Move ruffen-docs formatting config to a ruff.toml config file#24074
AlexWaygood merged 1 commit intomainfrom
alex/mdtest-formatting-config

Conversation

@AlexWaygood
Copy link
Member

Summary

Moving these configuration settings to a config file means I can enable format-on-save for the Ruff formatter on MarkDown files in VSCode, and it will instantly reformat my mdtests with the correct settings.

Test Plan

I enabled format-on-save for the Ruff formatter on MarkDown files by adjusting my user settings in VSCode as follows:

{
    "ruff.format.preview": true,
    "[markdown]": {
        "editor.formatOnSave": true,
        "editor.formatOnType": true,
        "editor.defaultFormatter": "charliermarsh.ruff"
    }
}

After having done so, I verified that all Python codeblocks in the mdtest I was working on were formatted on save by Ruff -- but they were formatted using the default settings (line length of 88, more verbose .py-style formatting with more line breaks) rather than using the configuration in our pre-commit file. After moving the configuration to the ruff.toml file, I verified that format-on-save now respects this formatting, and uvx prek run -a also still works as expected.

@AlexWaygood AlexWaygood added internal An internal refactor or improvement ty Multi-file analysis & type inference labels Mar 20, 2026
@AlexWaygood AlexWaygood changed the title [ty] Move ruffen-docs formatting to a ruff.toml config file [ty] Move ruffen-docs formatting config to a ruff.toml config file Mar 20, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 20, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 85.29%. The percentage of expected errors that received a diagnostic held steady at 78.13%. The number of fully passing files held steady at 64/132.

@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 20, 2026

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 20, 2026

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@AlexWaygood AlexWaygood merged commit 03bee53 into main Mar 20, 2026
49 checks passed
@AlexWaygood AlexWaygood deleted the alex/mdtest-formatting-config branch March 20, 2026 12:08
carljm added a commit that referenced this pull request Mar 25, 2026
* main:
  [`flake8-bandit`] Check tuple arguments for partial paths in `S607` (#24080)
  [ty] Update Salsa (#24081)
  Update Rust toolchain to 1.94 and MSRV to 1.92 (#24076)
  [ty] Move ruffen-docs formatting config to a `ruff.toml` config file (#24074)
  [ty] `reveal_type` diagnostics in unreachable code (#24070)
  [ty] Improve keyword argument narrowing for nested dictionaries (#24010)
  [ty] Preserve blank lines between comments and imports in add-import action (#24066)
  [ty] Add diagnostic hint for invalid assignments involving invariant generics (#24032)
  Clarify `extend-ignore` and `extend-select` settings documentation (#24064)
  [ty] Batch changes to watched paths (#24045)
  replace deprecated `std::f64::EPSILON` with `f64::EPSILON` (#24067)
  [ty] Fix untracked reads in Salsa queries that can lead to backdating panics (#24051)
  [ty] Unions/intersections of gradual types should be assignable to `Never` (#24056)
  Fix incorrect path for ty_python_semantic in fuzzer (#24052)
  Bump 0.15.7 (#24049)
  [ty] ecosystem-analyzer: Fail on newly panicking projects (#24043)
  Don't show noqa hover for non-Python documents (#24040)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants