foamlib 0.2.8__py3-none-any.whl → 0.2.9__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 CHANGED
@@ -1,6 +1,6 @@
1
1
  """A Python interface for interacting with OpenFOAM."""
2
2
 
3
- __version__ = "0.2.8"
3
+ __version__ = "0.2.9"
4
4
 
5
5
  from ._cases import AsyncFoamCase, FoamCase, FoamCaseBase
6
6
  from ._dictionaries import FoamDictionaryBase, FoamFieldFile, FoamFile
@@ -1,4 +1,5 @@
1
1
  import sys
2
+ from copy import deepcopy
2
3
  from pathlib import Path
3
4
  from types import TracebackType
4
5
  from typing import (
@@ -72,9 +73,12 @@ class _FoamFileBase:
72
73
  assert self.__contents is not None
73
74
 
74
75
  if self.__parsed is None:
75
- self.__parsed = parse(self.__contents)
76
+ parsed = parse(self.__contents)
77
+ self.__parsed = parsed
78
+ else:
79
+ parsed = deepcopy(self.__parsed)
76
80
 
77
- return self.__contents, self.__parsed
81
+ return self.__contents, parsed
78
82
 
79
83
  def _write(self, contents: str) -> None:
80
84
  self.__contents = contents
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foamlib
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: A Python interface for interacting with OpenFOAM
5
5
  Author-email: "Gabriel S. Gerlero" <ggerlero@cimec.unl.edu.ar>
6
6
  Project-URL: Homepage, https://github.com/gerlero/foamlib
@@ -1,14 +1,14 @@
1
- foamlib/__init__.py,sha256=y4oSMModvQ8ODy8CLcq4AzJpIAJMDFspldx67cdai5Y,344
1
+ foamlib/__init__.py,sha256=xipBAyZhJ9168-UsgVjKmQdIbtsqDB3a3sLY93n3sBY,344
2
2
  foamlib/_cases.py,sha256=SjDTVauOlcrtyvnt5uxWGSu2RYZ0lhKRmvMnuRnRuzI,20973
3
3
  foamlib/_util.py,sha256=PBTpBwt_j1GXASncSDZUR8pH2u_h8UyJXm8GeFKebTY,2552
4
4
  foamlib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  foamlib/_dictionaries/__init__.py,sha256=vxGpA7uaEbJwKFGOYdLFR6R9jcUj_HW60YzZBMjNXRo,160
6
6
  foamlib/_dictionaries/_base.py,sha256=0GkUmj268EmrGfB553JGLuNM6xq8DTIYK2NdN1rvFYU,1836
7
- foamlib/_dictionaries/_files.py,sha256=Sz7wnCjZZSHWEnLw-MpAGqSiM47NS2Vrrc5rfCgJR74,12942
7
+ foamlib/_dictionaries/_files.py,sha256=P-FzR3Db6T_WQDh_RF07aLgyp0UUJxxD3i7_WBk1CMM,13048
8
8
  foamlib/_dictionaries/_parsing.py,sha256=kzpuY_KlvkyMXIamxVwVvYSMpMY5sXCbIZ2ARNdWJtg,5512
9
9
  foamlib/_dictionaries/_serialization.py,sha256=tbg63f0Nro89iqN2fsEnRzVPoxOVxYDZA4H9YhUiGtw,3776
10
- foamlib-0.2.8.dist-info/LICENSE.txt,sha256=5Dte9TUnLZzPRs4NQzl-Jc2-Ljd-t_v0ZR5Ng5r0UsY,35131
11
- foamlib-0.2.8.dist-info/METADATA,sha256=QZ6WZ8eZl9hUAjmEDZg8gahPqCQuonPWN9Kx6N2VluU,4650
12
- foamlib-0.2.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
13
- foamlib-0.2.8.dist-info/top_level.txt,sha256=ZdVYtetXGwPwyfL-WhlhbTFQGAwKX5P_gXxtH9JYFPI,8
14
- foamlib-0.2.8.dist-info/RECORD,,
10
+ foamlib-0.2.9.dist-info/LICENSE.txt,sha256=5Dte9TUnLZzPRs4NQzl-Jc2-Ljd-t_v0ZR5Ng5r0UsY,35131
11
+ foamlib-0.2.9.dist-info/METADATA,sha256=GAw9nlyxHbi7XxpJEIKIjLPal8j__tcNOaurCoG6PJQ,4650
12
+ foamlib-0.2.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
13
+ foamlib-0.2.9.dist-info/top_level.txt,sha256=ZdVYtetXGwPwyfL-WhlhbTFQGAwKX5P_gXxtH9JYFPI,8
14
+ foamlib-0.2.9.dist-info/RECORD,,