@@ -39,6 +39,7 @@ external = ["F821", "NQA", "Y"]
3939select = [
4040 " ARG" , # flake8-unused-arguments
4141 " B" , # flake8-bugbear
42+ " D" , # pydocstyle
4243 " EXE" , # flake8-executable
4344 " FA" , # flake8-future-annotations
4445 " I" , # isort
@@ -108,11 +109,15 @@ ignore = [
108109 # ##
109110 # Rules we don't want or don't agree with
110111 # ##
111- # Slower and more verbose https://github.com/astral-sh/ruff/issues/7871
112- " UP038" , # Use `X | Y` in `isinstance` call instead of `(X, Y)`
112+ # We're not a library, no need to document everything
113+ " D1" , # Missing docstring in ...
114+ # Doesn't support split "summary line"
115+ " D205" , # 1 blank line required between summary line and description
113116 # Used for direct, non-subclass type comparison, for example: `type(val) is str`
114117 # see https://github.com/astral-sh/ruff/issues/6465
115118 " E721" , # Do not compare types, use `isinstance()`
119+ # Slower and more verbose https://github.com/astral-sh/ruff/issues/7871
120+ " UP038" , # Use `X | Y` in `isinstance` call instead of `(X, Y)`
116121 # ##
117122 # False-positives, but already checked by type-checkers
118123 # ##
@@ -139,11 +144,16 @@ ignore = [
139144 " RUF022" ,
140145 " RUF023" ,
141146]
142- # See comment on black's force-exclude config above
143147"*_pb2.pyi" = [
148+ # Leave the docstrings as-is, matching source
149+ " D" , # pydocstyle
150+ # See comment on black's force-exclude config above
144151 " E501" , # Line too long
145152]
146153
154+ [tool .ruff .lint .pydocstyle ]
155+ convention = " pep257" # https://docs.astral.sh/ruff/settings/#lint_pydocstyle_convention
156+
147157[tool .ruff .lint .isort ]
148158split-on-trailing-comma = false
149159combine-as-imports = true
0 commit comments