Skip to content

Commit

Permalink
fix type-hint error
Browse files Browse the repository at this point in the history
  • Loading branch information
ischaojie committed Nov 30, 2022
1 parent 3f71e5d commit c71b406
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/src/hatchling/metadata/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import sys
from copy import deepcopy
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, cast

from hatchling.metadata.utils import get_normalized_dependency, is_valid_project_name, normalize_project_name
from hatchling.utils.constants import DEFAULT_CONFIG_FILE
Expand Down Expand Up @@ -421,7 +421,7 @@ def version(self) -> str:

self._version = version

return self._version # type: ignore
return cast(str, self._version)

@property
def description(self) -> str:
Expand Down Expand Up @@ -544,7 +544,7 @@ def readme_content_type(self) -> str:
if self._readme_content_type is None:
_ = self.readme

return self._readme_content_type
return cast(str, self._readme_content_type)

@property
def readme_path(self) -> str:
Expand All @@ -554,7 +554,7 @@ def readme_path(self) -> str:
if self._readme_path is None:
_ = self.readme

return self._readme_path
return cast(str, self._readme_path)

@property
def requires_python(self) -> str:
Expand Down Expand Up @@ -658,7 +658,7 @@ def license_expression(self) -> str:
if self._license_expression is None:
_ = self.license

return self._license_expression
return cast(str, self._license_expression)

@property
def license_files(self) -> list[str]:
Expand Down Expand Up @@ -785,7 +785,7 @@ def authors_data(self) -> dict[str, list[str]]:
if self._authors_data is None:
_ = self.authors

return self._authors_data
return cast(dict, self._authors_data)

@property
def maintainers(self) -> list[str]:
Expand Down Expand Up @@ -849,7 +849,7 @@ def maintainers_data(self) -> dict[str, list[str]]:
if self._maintainers_data is None:
_ = self.maintainers

return self._maintainers_data
return cast(dict, self._maintainers_data)

@property
def keywords(self) -> list[str]:
Expand Down

0 comments on commit c71b406

Please sign in to comment.