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

@@ -62,7 +62,7 @@ class CommandLineArgs:
def valid_path(cmd_arg: str) -> Path:
"""Helper function for argument-parsing"""
"""Parse a CLI argument that is intended to point to a valid typeshed path."""
path = Path(cmd_arg)
if not path.exists():
raise argparse.ArgumentTypeError(f'"{path}" does not exist in typeshed!')
@@ -72,7 +72,10 @@ def valid_path(cmd_arg: str) -> Path:
def remove_dev_suffix(version: str) -> str:
"""Helper function for argument-parsing"""
"""Remove the `-dev` suffix from a version string.
This is a helper function for argument-parsing.
"""
if version.endswith("-dev"):
return version[: -len("-dev")]
return version
@@ -303,7 +306,6 @@ def test_third_party_distribution(
Return a tuple, where the first element indicates mypy's return code
and the second element is the number of checked files.
"""
files: list[Path] = []
configurations: list[MypyDistConf] = []
seen_dists: set[str] = set()