From 582daf9d80710705e8ecca9f7b1c0103e808ce8f Mon Sep 17 00:00:00 2001 From: Gabriel Gerlero Date: Thu, 28 Mar 2024 22:25:01 -0300 Subject: [PATCH] Update repr methods --- foamlib/_dictionaries.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foamlib/_dictionaries.py b/foamlib/_dictionaries.py index dc0fb37..57567f2 100644 --- a/foamlib/_dictionaries.py +++ b/foamlib/_dictionaries.py @@ -136,7 +136,7 @@ def __len__(self) -> int: return len(list(iter(self))) def __repr__(self) -> str: - return "FoamFile.Dictionary" + return f"FoamFile.Dictionary({self._file}, {self._keywords})" class FoamFile(_FoamDictionary): @@ -201,7 +201,7 @@ def __getitem__( return ret def __repr__(self) -> str: - return "FoamFieldFile.BoundariesDictionary" + return f"{type(self).__qualname__}({self._file}, {self._keywords})" class BoundaryDictionary(_FoamDictionary): """An OpenFOAM dictionary representing a boundary condition as a mutable mapping.""" @@ -260,7 +260,7 @@ def value(self) -> None: del self["value"] def __repr__(self) -> str: - return "FoamFieldFile.BoundaryDictionary" + return f"{type(self).__qualname__}({self._file}, {self._keywords})" def __getitem__(self, key: str) -> Union[FoamFile.Value, _FoamDictionary]: ret = super().__getitem__(key)