Skip to content

D403 not triggering when it should #2989

@cazador481

Description

@cazador481

I am seeing D4-3 not hitting a number of cases where flake8 is.
To replicate ruff test.py --select D403 -n --isolated

Code:

"""Contains tests for the configuration library."""
import unittest


class BasicConfigurationTest(unittest.TestCase):
    """Doc string."""

    @classmethod
    def setUpClass(cls):
        """runs just once when the class instance is setup."""
        pass

I expect the docstring for setUpClass to catch the lower case runs, which is a D403 error

Flake8 catches the error:

poetry run flake8 test.py
test.py:10:1: D403 First word of the first line should be properly capitalized

I am using ruff version
poetry run ruff --version
ruff 0.0.247

pyproject.toml setup

[tool.ruff.pycodestyle]
max-doc-length = 120

[tool.ruff]
line-length = 120
exclude = [".venv"]
ignore = [
    "D105",
    "D107",
    "D401",
    "E501",
    "W505",
]
select = [
    "B",
    # "C",
    "D",
    "D415",
    "E",
    "F",
    "N",
    "W",
]

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
"dejavu/__init__.py" = ["F401"]

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocstringRelated to docstring linting or formatting

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions