summaryrefslogtreecommitdiff
path: root/src/setuptools_scm/_entrypoints.py
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2023-05-09 13:17:04 +0200
committerGitHub <noreply@github.com>2023-05-09 13:17:04 +0200
commit4751f74e4e1478f439ea8fb2102365460acc556b (patch)
tree24749cb039b171df2690edec2e8cbd2428428eac /src/setuptools_scm/_entrypoints.py
parentd2087b0c8e52f6600f7f68b74ff688bcdf04aaeb (diff)
parent2e1ada5f75b74ea181c786550e9e858c02c66547 (diff)
downloadsetuptools-scm-4751f74e4e1478f439ea8fb2102365460acc556b.tar.gz
Merge pull request #845 from RonnyPfannschmidt/move-setuptools-integrationHEADmain
move setuptools integration to private subpackage
Diffstat (limited to 'src/setuptools_scm/_entrypoints.py')
-rw-r--r--src/setuptools_scm/_entrypoints.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/setuptools_scm/_entrypoints.py b/src/setuptools_scm/_entrypoints.py
index 01b48b1..62a18e1 100644
--- a/src/setuptools_scm/_entrypoints.py
+++ b/src/setuptools_scm/_entrypoints.py
@@ -79,10 +79,9 @@ def _get_ep(group: str, name: str) -> Any | None:
return None
-def _get_from_object_reference_str(path: str) -> Any | None:
- ep: EntrypointProtocol = EntryPoint(
- path, path, None
- ) # type: ignore [no-untyped-call]
+def _get_from_object_reference_str(path: str, group: str) -> Any | None:
+ # todo: remove for importlib native spelling
+ ep: EntrypointProtocol = EntryPoint(path, path, group)
try:
return ep.load()
except (AttributeError, ModuleNotFoundError):
@@ -100,7 +99,7 @@ def _iter_version_schemes(
scheme_value = cast(
"_t.VERSION_SCHEMES",
_get_ep(entrypoint, scheme_value)
- or _get_from_object_reference_str(scheme_value),
+ or _get_from_object_reference_str(scheme_value, entrypoint),
)
if isinstance(scheme_value, (list, tuple)):