summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/resources/simple.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-10-16 19:00:39 (GMT)
committerGitHub <noreply@github.com>2022-10-16 19:00:39 (GMT)
commitcea910ebf14d1bd9d8bc0c8a5046e69ae8f5be17 (patch)
treed8f509aa9e5bbb452117ce6eb5de2714171edeb4 /Lib/importlib/resources/simple.py
parent5c9302d03a57759225dab9e2d7bdd38e79009441 (diff)
downloadcpython-cea910ebf14d1bd9d8bc0c8a5046e69ae8f5be17.zip
cpython-cea910ebf14d1bd9d8bc0c8a5046e69ae8f5be17.tar.gz
cpython-cea910ebf14d1bd9d8bc0c8a5046e69ae8f5be17.tar.bz2
gh-97930: Merge with importlib_resources 5.9 (GH-97929)
* Merge with importlib_resources 5.9 * Update changelog
Diffstat (limited to 'Lib/importlib/resources/simple.py')
-rw-r--r--Lib/importlib/resources/simple.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/Lib/importlib/resources/simple.py b/Lib/importlib/resources/simple.py
index d0fbf23..b85e469 100644
--- a/Lib/importlib/resources/simple.py
+++ b/Lib/importlib/resources/simple.py
@@ -99,20 +99,6 @@ class ResourceContainer(Traversable):
def open(self, *args, **kwargs):
raise IsADirectoryError()
- @staticmethod
- def _flatten(compound_names):
- for name in compound_names:
- yield from name.split('/')
-
- def joinpath(self, *descendants):
- if not descendants:
- return self
- names = self._flatten(descendants)
- target = next(names)
- return next(
- traversable for traversable in self.iterdir() if traversable.name == target
- ).joinpath(*names)
-
class TraversableReader(TraversableResources, SimpleReader):
"""