mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-91298: Refine traversable (apply changes from importlib_resources 5.7.1) (#91623)
* bpo-47142: Refine traversable (apply changes from importlib_resources 5.7.1) * Replace changelog referencing github issue.
This commit is contained in:
parent
67712e71b3
commit
7659681556
4 changed files with 42 additions and 16 deletions
|
@ -42,7 +42,7 @@ def generate(suffix):
|
|||
|
||||
def walk(datapath):
|
||||
for dirpath, dirnames, filenames in os.walk(datapath):
|
||||
with contextlib.suppress(KeyError):
|
||||
with contextlib.suppress(ValueError):
|
||||
dirnames.remove('__pycache__')
|
||||
for filename in filenames:
|
||||
res = pathlib.Path(dirpath) / filename
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue