Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D403 not triggering when it should #2989

Closed
cazador481 opened this issue Feb 17, 2023 · 1 comment · Fixed by #2992
Closed

D403 not triggering when it should #2989

cazador481 opened this issue Feb 17, 2023 · 1 comment · Fixed by #2992
Assignees
Labels
bug Something isn't working docstring Related to docstring linting or formatting

Comments

@cazador481
Copy link

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"]
@charliermarsh charliermarsh added bug Something isn't working docstring Related to docstring linting or formatting labels Feb 17, 2023
@charliermarsh charliermarsh self-assigned this Feb 17, 2023
@charliermarsh
Copy link
Member

Thanks, just an oversight!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docstring Related to docstring linting or formatting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants