Skip to content

Commit

Permalink
Merge pull request #34 from gerlero/dictionaries
Browse files Browse the repository at this point in the history
Update handling of regex keywords
  • Loading branch information
gerlero authored Mar 25, 2024
2 parents d0f686c + a650d4f commit 64791da
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions foamlib/_dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,7 @@ def __delitem__(self, key: str) -> None:
self._cmd(["-remove"], key=key)

def __iter__(self) -> Iterator[str]:
for key in self._cmd(["-keywords"]).splitlines():
if not key.startswith('"'):
yield key
yield from self._cmd(["-keywords"]).splitlines()

def __len__(self) -> int:
return len(list(iter(self)))
Expand Down

0 comments on commit 64791da

Please sign in to comment.