Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Avasam <samuel.06@hotmail.com>
  • Loading branch information
srittau and Avasam authored Mar 3, 2025
1 parent 67273cc commit 4ff86ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stub_uploader/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def verify_typeshed_req(req: Requirement) -> None:
"urllib3",
}

# Map of external stub packages to their runtime equivalent. We check that
# the stubs actually depend on their runtime package.
# Map of external stub packages to their runtime equivalent.
# We check that the stubs actually depend on their runtime package.
EXTERNAL_RUNTIME_REQ_MAP = {
"django-stubs": "django",
"djangorestframework-stubs": "djangorestframework",
Expand Down Expand Up @@ -282,6 +282,7 @@ def extract_sdist_requires(
def verify_external_req(
req: Requirement,
upstream_distribution: Optional[str],
*,
_unsafe_ignore_allowlist: bool = False, # used for tests
) -> None:
"""Verify that a non-typeshed dependency is valid.
Expand Down Expand Up @@ -313,6 +314,7 @@ def verify_external_req_name(req: Requirement) -> None:

def verify_external_req_in_allowlist(
req: Requirement,
*,
_unsafe_ignore_allowlist: bool = False, # used for tests
) -> None:
if req.name not in EXTERNAL_REQ_ALLOWLIST and not _unsafe_ignore_allowlist:
Expand Down

0 comments on commit 4ff86ca

Please sign in to comment.