Skip to content

Commit d6abb64

Browse files
committed
Rename arguments on _EditableFinder and _EditableNamespaceFinder
This commit rename the `find_spec` arguments in _EditableFinder and _EditableNamespaceFinder to be compliant of the standard `importlib.abc.MetaPathFinder` interface. https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder.find_spec https://github.com/abravalheri/typeshed/blob/eecac02ef7fdbe82b9dc57fa3ca4bb9d341116d7/stdlib/_typeshed/importlib.pyi The `find_module` arguments were not renamed because the method `find_module` is deprecated starting from Pyhton3.10 and has been removed in Pyhton3.12 https://docs.python.org/3/reference/import.html#the-meta-path
1 parent 634d81d commit d6abb64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setuptools/command/editable_wheel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def _get_root(self):
805805
806806
class _EditableFinder: # MetaPathFinder
807807
@classmethod
808-
def find_spec(cls, fullname: str, _path=None, _target=None) -> ModuleSpec | None:
808+
def find_spec(cls, fullname: str, path=None, target=None) -> ModuleSpec | None: # type: ignore
809809
# Top-level packages and modules (we know these exist in the FS)
810810
if fullname in MAPPING:
811811
pkg_path = MAPPING[fullname]
@@ -851,7 +851,7 @@ def _paths(cls, fullname: str) -> list[str]:
851851
return [*paths, PATH_PLACEHOLDER]
852852
853853
@classmethod
854-
def find_spec(cls, fullname: str, _target=None) -> ModuleSpec | None:
854+
def find_spec(cls, fullname: str, target=None) -> ModuleSpec | None: # type: ignore
855855
if fullname in NAMESPACES:
856856
spec = ModuleSpec(fullname, None, is_package=True)
857857
spec.submodule_search_locations = cls._paths(fullname)

0 commit comments

Comments
 (0)