Enable Ruff D (pydocstyle) with pep257 convention (#13326)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Avasam
2025-01-02 17:05:35 -05:00
committed by GitHub
parent a151457936
commit 9c959a7dd3
12 changed files with 34 additions and 22 deletions

View File

@@ -74,7 +74,7 @@ def create_parser() -> argparse.ArgumentParser:
def run_pytype(*, filename: str, python_version: str, missing_modules: Iterable[str]) -> str | None:
"""Runs pytype, returning the stderr if any."""
"""Run pytype, returning the stderr if any."""
if python_version not in _LOADERS:
options = pytype_config.Options.create("", parse_pyi=True, python_version=python_version)
# For simplicity, pretends missing modules are part of the stdlib.
@@ -107,7 +107,7 @@ def _get_relative(filename: str) -> str:
def _get_module_name(filename: str) -> str:
"""Converts a filename {subdir}/m.n/module/foo to module.foo."""
"""Convert a filename {subdir}/m.n/module/foo to module.foo."""
parts = _get_relative(filename).split(os.path.sep)
if parts[0] == "stdlib":
module_parts = parts[1:]