Skip to content

D417 false-positive #3578

@divaltor

Description

@divaltor

Hello, there is bug with enabled D417 rule (pydocstyle). Tested on ruff 0.0.256 and Python 3.10

class Test:
  def run(self, /, arg1: int) -> None:
    """
    Some beauty description.

    Args:
      arg1: some description of arg
    """
$ ruff .
> D417 Missing argument description in the docstring: `self`

If we don't mark arguments as positional-keyword only like this

class Test:
  def run(self, arg1: int) -> None:
    """
    Some beauty description.

    Args:
      arg1: some description of arg
    """

Then ruff gives clear log

$ ruff .
> Found 0 errors.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions