foamlib 0.3.22__py3-none-any.whl → 0.3.23__py3-none-any.whl
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.
- foamlib/__init__.py +1 -1
- foamlib/_files/_files.py +8 -2
- foamlib/_files/_parsing.py +3 -1
- {foamlib-0.3.22.dist-info → foamlib-0.3.23.dist-info}/METADATA +1 -1
- {foamlib-0.3.22.dist-info → foamlib-0.3.23.dist-info}/RECORD +8 -8
- {foamlib-0.3.22.dist-info → foamlib-0.3.23.dist-info}/WHEEL +1 -1
- {foamlib-0.3.22.dist-info → foamlib-0.3.23.dist-info}/LICENSE.txt +0 -0
- {foamlib-0.3.22.dist-info → foamlib-0.3.23.dist-info}/top_level.txt +0 -0
foamlib/__init__.py
CHANGED
foamlib/_files/_files.py
CHANGED
@@ -220,7 +220,8 @@ class FoamFile(
|
|
220
220
|
|
221
221
|
self._write(
|
222
222
|
contents[:start]
|
223
|
-
+ b"\n"
|
223
|
+
+ (b"\n" if contents[start - 1 : start] != b"\n" else b"")
|
224
|
+
+ (b" " * (len(keywords) - 1) if keywords else b"")
|
224
225
|
+ dumpb({keywords[-1]: {}})
|
225
226
|
+ b"\n"
|
226
227
|
+ contents[end:]
|
@@ -251,7 +252,12 @@ class FoamFile(
|
|
251
252
|
|
252
253
|
self._write(
|
253
254
|
contents[:start]
|
254
|
-
+
|
255
|
+
+ (
|
256
|
+
b"\n"
|
257
|
+
if start > 0 and contents[start - 1 : start] != b"\n"
|
258
|
+
else b""
|
259
|
+
)
|
260
|
+
+ (b" " * (len(keywords) - 1) if keywords else b"")
|
255
261
|
+ dumpb({keywords[-1]: data}, kind=kind)
|
256
262
|
+ b"\n"
|
257
263
|
+ contents[end:]
|
foamlib/_files/_parsing.py
CHANGED
@@ -184,6 +184,8 @@ class Parsed(Mapping[Tuple[str, ...], Union[FoamDict.Data, EllipsisType]]):
|
|
184
184
|
Tuple[str, ...],
|
185
185
|
Tuple[int, Union[FoamDict.Data, EllipsisType], int],
|
186
186
|
] = {}
|
187
|
+
self._end = len(contents)
|
188
|
+
|
187
189
|
for parse_result in _FILE.parse_string(
|
188
190
|
contents.decode("latin-1"), parse_all=True
|
189
191
|
):
|
@@ -242,7 +244,7 @@ class Parsed(Mapping[Tuple[str, ...], Union[FoamDict.Data, EllipsisType]]):
|
|
242
244
|
_, _, end = self._parsed[keywords[:-1]]
|
243
245
|
end -= 1
|
244
246
|
else:
|
245
|
-
end =
|
247
|
+
end = self._end
|
246
248
|
|
247
249
|
start = end
|
248
250
|
else:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
foamlib/__init__.py,sha256=
|
1
|
+
foamlib/__init__.py,sha256=pFmZVC3Cy4orJQeNLbr2JbQw3fVdOgShmuvNNIU0e9U,439
|
2
2
|
foamlib/_util.py,sha256=UMzXmTFgvbp46w6k3oEZJoYC98pFgEK6LN5uLOwrlCg,397
|
3
3
|
foamlib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
foamlib/_cases/__init__.py,sha256=xnQpR64EvFtCh07qnSz7kjQ1IhJXjRDwaZWwQGZhGv4,280
|
@@ -8,12 +8,12 @@ foamlib/_cases/_sync.py,sha256=CloQgd-93jxfSXIt7J5NxcAu3N_iF3eXMKO-NfNOgi4,4522
|
|
8
8
|
foamlib/_cases/_util.py,sha256=v6sHxHCEgagsVuup0S1xJW-x9py5xj3bUye8PiFfb3o,925
|
9
9
|
foamlib/_files/__init__.py,sha256=vDkPj8u8bX_I_m2YfeKvXBgwg8D1ufyFCfHGHKN3JPQ,140
|
10
10
|
foamlib/_files/_base.py,sha256=YA5a-i5HZuA3JslCD6r-DwZzpSA8r42dqSXef286Ako,2050
|
11
|
-
foamlib/_files/_files.py,sha256=
|
11
|
+
foamlib/_files/_files.py,sha256=BPRbZLclOmxemuBTXpEeNoiUMx3VL_FUCGsX1YlidcA,14635
|
12
12
|
foamlib/_files/_io.py,sha256=hlcqQqU-1cdIbDc3YqxnMfxALo4SFAEcRIoZM2vMtnE,2083
|
13
|
-
foamlib/_files/_parsing.py,sha256
|
13
|
+
foamlib/_files/_parsing.py,sha256=3Hp4pdVgrneCtVJl4G65cQYwOA9CwUOcH5jtIfNY014,7738
|
14
14
|
foamlib/_files/_serialization.py,sha256=LCeaLWtNvkcs0dfowL7nViiByxw7U_fvgueVjFliipU,3462
|
15
|
-
foamlib-0.3.
|
16
|
-
foamlib-0.3.
|
17
|
-
foamlib-0.3.
|
18
|
-
foamlib-0.3.
|
19
|
-
foamlib-0.3.
|
15
|
+
foamlib-0.3.23.dist-info/LICENSE.txt,sha256=5Dte9TUnLZzPRs4NQzl-Jc2-Ljd-t_v0ZR5Ng5r0UsY,35131
|
16
|
+
foamlib-0.3.23.dist-info/METADATA,sha256=0i-sNTwsELdUk54SvL0Dz70CarcmkqU2_HYsLftSwps,5458
|
17
|
+
foamlib-0.3.23.dist-info/WHEEL,sha256=uCRv0ZEik_232NlR4YDw4Pv3Ajt5bKvMH13NUU7hFuI,91
|
18
|
+
foamlib-0.3.23.dist-info/top_level.txt,sha256=ZdVYtetXGwPwyfL-WhlhbTFQGAwKX5P_gXxtH9JYFPI,8
|
19
|
+
foamlib-0.3.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|