Skip to content

D400: bad autofix if the first line ends in a question mark #13365

@AlexWaygood

Description

@AlexWaygood

The autofix for D400 currently changes this:

def should_frob() -> bool:
    """Should we frob the bar?"""

To this:

def should_frob() -> bool:
    """Should we frob the bar?."""

Which seems pretty clearly worse! We probably just shouldn't offer an autofix if the first line ends in a question mark or exclamation mark?

List of keywords you searched for before creating this issue:

  • D400
  • ends-in-period

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocstringRelated to docstring linting or formattingfixesRelated to suggested fixes for violationshelp wantedContributions especially welcome

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions