Skip to content

Commit

Permalink
Cast name and version to strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 25, 2024
1 parent 534e257 commit b584973
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion twine/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
self.metadata = metadata
self.python_version = python_version
self.filetype = filetype
self.safe_name = _safe_name(metadata.name)
self.safe_name = _safe_name(cast(str, metadata.name))
self.signed_filename = self.filename + ".asc"
self.signed_basefilename = self.basefilename + ".asc"
self.gpg_signature: Optional[Tuple[str, bytes]] = None
Expand Down
2 changes: 1 addition & 1 deletion twine/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def package_is_uploaded(
releases = {}
self._releases_json_data[safe_name] = releases

packages = releases.get(package.metadata.version, [])
packages = releases.get(cast(str, package.metadata.version), [])

for uploaded_package in packages:
if uploaded_package["filename"] == package.basefilename:
Expand Down

0 comments on commit b584973

Please sign in to comment.