mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
gh-102209: Sync with zipp 3.15 moving complexity tests into dedicated module (#102232)
Sync with jaraco/zipp@757a4e1a.
This commit is contained in:
parent
207e1c5cae
commit
a35fd38b57
7 changed files with 87 additions and 51 deletions
|
@ -86,6 +86,11 @@ class CompleteDirs(InitializedState, zipfile.ZipFile):
|
|||
"""
|
||||
A ZipFile subclass that ensures that implied directories
|
||||
are always included in the namelist.
|
||||
|
||||
>>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt']))
|
||||
['foo/', 'foo/bar/']
|
||||
>>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt', 'foo/bar/']))
|
||||
['foo/']
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
|
@ -215,7 +220,7 @@ class Path:
|
|||
|
||||
Read text:
|
||||
|
||||
>>> c.read_text()
|
||||
>>> c.read_text(encoding='utf-8')
|
||||
'content of c'
|
||||
|
||||
existence:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue