Skip to content

Warn about D203 formatter incompatibility#12238

Merged
MichaReiser merged 1 commit intomainfrom
warn-about-d203-formatter-incompatibility
Jul 8, 2024
Merged

Warn about D203 formatter incompatibility#12238
MichaReiser merged 1 commit intomainfrom
warn-about-d203-formatter-incompatibility

Conversation

@MichaReiser
Copy link
Copy Markdown
Member

@MichaReiser MichaReiser commented Jul 8, 2024

Summary

Fixes #12220

Test Plan

Select all

❯ cargo run --bin ruff -- format ../test/test2.py  --no-cache
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/ruff format ../test/test2.py --no-cache`
warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible. Ignoring `one-blank-line-before-class`.
warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. Ignoring `multi-line-summary-second-line`.
1 file left unchanged

With D211 ignored (and D203 enabled)

ruff on  main [$!] is 📦 v0.5.1 via 🐍 v3.12.4 via 🦀 v1.79.0 
❯ cargo run --bin ruff -- format ../test/test2.py  --no-cache
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/ruff format ../test/test2.py --no-cache`
warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. Ignoring `multi-line-summary-second-line`.
warning: The following rules may cause conflicts when used with the formatter: `D203`. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration.
1 file left unchanged

@MichaReiser MichaReiser added the cli Related to the command-line interface label Jul 8, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 8, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser requested a review from charliermarsh July 8, 2024 09:19
@MichaReiser MichaReiser merged commit bf3d903 into main Jul 8, 2024
@MichaReiser MichaReiser deleted the warn-about-d203-formatter-incompatibility branch July 8, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to the command-line interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflict between check and format with D203

3 participants