mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user