koro 1.0.5__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {koro-1.0.5 → koro-1.0.7}/PKG-INFO +1 -1
- {koro-1.0.5 → koro-1.0.7}/setup.cfg +1 -1
- {koro-1.0.5 → koro-1.0.7}/src/koro/file/zip.py +1 -1
- {koro-1.0.5 → koro-1.0.7}/src/koro/item/group.py +4 -2
- {koro-1.0.5 → koro-1.0.7}/src/koro.egg-info/PKG-INFO +1 -1
- {koro-1.0.5 → koro-1.0.7}/src/koro.egg-info/SOURCES.txt +0 -1
- koro-1.0.5/src/koro/item/__init__.py +0 -0
- {koro-1.0.5 → koro-1.0.7}/LICENSE +0 -0
- {koro-1.0.5 → koro-1.0.7}/pyproject.toml +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro/__init__.py +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro/file/__init__.py +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro/file/dir.py +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro/file/lvl.py +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro/item/level.py +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro/item/save.py +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro.egg-info/dependency_links.txt +0 -0
- {koro-1.0.5 → koro-1.0.7}/src/koro.egg-info/top_level.txt +0 -0
@@ -95,7 +95,7 @@ class ZipLevel(Level):
|
|
95
95
|
|
96
96
|
def write(self, new_content: bytes, /) -> None:
|
97
97
|
contents: Final[dict[ZipInfo, bytes]] = {}
|
98
|
-
with ZipFile(self.path) as a:
|
98
|
+
with ZipFile(self.path, "a") as a:
|
99
99
|
for info in filterfalse(
|
100
100
|
lambda info: info.filename == self.fn, a.infolist()
|
101
101
|
):
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from abc import ABC
|
2
2
|
from collections.abc import Iterable, Sequence
|
3
|
-
from itertools import filterfalse
|
4
3
|
from typing import Final, Generic, Optional, TypeVar
|
5
4
|
|
6
5
|
from .level import Level, LevelNotFoundError
|
@@ -38,6 +37,9 @@ class Group(ABC, Generic[_L], Sequence[_L]):
|
|
38
37
|
"""Replace the contents of this Group with the specified new content. None values will empty the slot they correspond to."""
|
39
38
|
for src, dest in zip(new_content, self, strict=True):
|
40
39
|
if src is None:
|
41
|
-
|
40
|
+
try:
|
41
|
+
dest.delete()
|
42
|
+
except LevelNotFoundError:
|
43
|
+
pass
|
42
44
|
else:
|
43
45
|
dest.write(src)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|