Skip to content

Formatter: dummy_implementations preview style #8357

@jab

Description

@jab

Add support for Black's dummy_implementations preview style. It introduces new rules around blank lines. Violates E704 that Ruff does not implement.

See psf/black#3796 and referenced links. E.g. from psf/black#1797 (comment):

  • If the body of a class or function is just ..., put it on the same line directly after the colon
  • If multiple adjacent functions with the same name each have only ... as their body, remove the blank lines between them. (This would apply to overloads in practice, but avoids hardcoding behavior for the "overload" name.)

This task is a child of #6935. This is required for ruff to provide a drop-in replacement for black with the preview style.

Metadata

Metadata

Assignees

Labels

formatterRelated to the formatterpreviewRelated to preview mode features

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions