Skip to content
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

Warn about D203 formatter incompatibility #12238

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

MichaReiser
Copy link
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
Copy link
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 merged commit bf3d903 into main Jul 8, 2024
20 checks passed
@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