MCPcopy
hub / github.com/mitmproxy/mitmproxy / ZipFile2

Class ZipFile2

release/build.py:63–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62
63class ZipFile2(zipfile.ZipFile):
64 # ZipFile and tarfile have slightly different APIs. Let's fix that.
65 def add(self, name: str, arcname: str) -> None:
66 return self.write(name, arcname)
67
68 def __enter__(self) -> ZipFile2:
69 return self
70
71 @property
72 def name(self) -> str:
73 assert self.filename
74 return self.filename
75
76
77def archive(path: Path) -> tarfile.TarFile | ZipFile2:

Callers 1

archiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…