mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +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:
@@ -184,7 +184,7 @@ _DIST_NAME_RE: Final = re.compile(r"^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$", re.IGNOR
|
||||
|
||||
|
||||
class NoSuchStubError(ValueError):
|
||||
"""Raise NoSuchStubError to indicate that a stubs/{distribution} directory doesn't exist"""
|
||||
"""Raise NoSuchStubError to indicate that a stubs/{distribution} directory doesn't exist."""
|
||||
|
||||
|
||||
@cache
|
||||
@@ -302,9 +302,10 @@ def read_metadata(distribution: str) -> StubMetadata:
|
||||
|
||||
|
||||
def update_metadata(distribution: str, **new_values: object) -> tomlkit.TOMLDocument:
|
||||
"""Updates a distribution's METADATA.toml.
|
||||
"""Update a distribution's METADATA.toml.
|
||||
|
||||
Return the updated TOML dictionary for use without having to open the file separately."""
|
||||
Return the updated TOML dictionary for use without having to open the file separately.
|
||||
"""
|
||||
path = metadata_path(distribution)
|
||||
try:
|
||||
with path.open("rb") as file:
|
||||
|
||||
@@ -92,7 +92,6 @@ def venv_python(venv_dir: Path) -> Path:
|
||||
@cache
|
||||
def parse_requirements() -> Mapping[str, Requirement]:
|
||||
"""Return a dictionary of requirements from the requirements file."""
|
||||
|
||||
with REQUIREMENTS_PATH.open(encoding="UTF-8") as requirements_file:
|
||||
stripped_lines = map(strip_comments, requirements_file)
|
||||
stripped_more = [li for li in stripped_lines if not li.startswith("-")]
|
||||
|
||||
Reference in New Issue
Block a user