mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[pydocstyle
] Skip leading whitespace for D403
(#14963)
Some checks are pending
CI / cargo shear (push) Blocked by required conditions
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Some checks are pending
CI / cargo shear (push) Blocked by required conditions
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
This PR introduces three changes to `D403`, which has to do with capitalizing the first word in a docstring. 1. The diagnostic and fix now skip leading whitespace when determining what counts as "the first word". 2. The name has been changed to `first-word-uncapitalized` from `first-line-capitalized`, for both clarity and compliance with our rule naming policy. 3. The diagnostic message and documentation has been modified slightly to reflect this. Closes #14890
This commit is contained in:
parent
a623d8f7c4
commit
6a5eff6017
6 changed files with 60 additions and 17 deletions
|
@ -31,3 +31,13 @@ def single_word():
|
|||
|
||||
def single_word_no_dot():
|
||||
"""singleword"""
|
||||
|
||||
def first_word_lots_of_whitespace():
|
||||
"""
|
||||
|
||||
|
||||
|
||||
here is the start of my docstring!
|
||||
|
||||
What do you think?
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue