Skip to content

Commit 45c03bd

Browse files
committed
add typing for simple functions
1 parent 2963377 commit 45c03bd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

importlib_metadata/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ def _name_from_stem(stem):
873873
return name
874874

875875

876-
def distribution(distribution_name) -> Distribution:
876+
def distribution(distribution_name: str) -> Distribution:
877877
"""Get the ``Distribution`` instance for the named package.
878878
879879
:param distribution_name: The name of the distribution package as a string.
@@ -890,7 +890,7 @@ def distributions(**kwargs) -> Iterable[Distribution]:
890890
return Distribution.discover(**kwargs)
891891

892892

893-
def metadata(distribution_name) -> _meta.PackageMetadata:
893+
def metadata(distribution_name: str) -> _meta.PackageMetadata:
894894
"""Get the metadata for the named package.
895895
896896
:param distribution_name: The name of the distribution package to query.
@@ -899,7 +899,7 @@ def metadata(distribution_name) -> _meta.PackageMetadata:
899899
return Distribution.from_name(distribution_name).metadata
900900

901901

902-
def version(distribution_name) -> str:
902+
def version(distribution_name: str) -> str:
903903
"""Get the version string for the named package.
904904
905905
:param distribution_name: The name of the distribution package to query.
@@ -933,7 +933,7 @@ def entry_points(**params) -> EntryPoints:
933933
return EntryPoints(eps).select(**params)
934934

935935

936-
def files(distribution_name) -> Optional[List[PackagePath]]:
936+
def files(distribution_name: str) -> Optional[List[PackagePath]]:
937937
"""Return a list of files for the named package.
938938
939939
:param distribution_name: The name of the distribution package to query.
@@ -942,7 +942,7 @@ def files(distribution_name) -> Optional[List[PackagePath]]:
942942
return distribution(distribution_name).files
943943

944944

945-
def requires(distribution_name) -> Optional[List[str]]:
945+
def requires(distribution_name: str) -> Optional[List[str]]:
946946
"""
947947
Return a list of requirements for the named package.
948948

0 commit comments

Comments
 (0)