Skip to content

Commit 0fe8bf5

Browse files
committed
Refactor whitespace in Program.from_dict method
Cleaned up whitespace in the Program.from_dict method for improved code readability. No functional changes were made.
1 parent 302018d commit 0fe8bf5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openevolve/database.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ def from_dict(cls, data: Dict[str, Any]) -> "Program":
7575
"""Create from dictionary representation"""
7676
# Get the valid field names for the Program dataclass
7777
valid_fields = {f.name for f in fields(cls)}
78-
78+
7979
# Filter the data to only include valid fields
8080
filtered_data = {k: v for k, v in data.items() if k in valid_fields}
81-
81+
8282
# Log if we're filtering out any fields
8383
if len(filtered_data) != len(data):
8484
filtered_out = set(data.keys()) - set(filtered_data.keys())
8585
logger.debug(f"Filtered out unsupported fields when loading Program: {filtered_out}")
86-
86+
8787
return cls(**filtered_data)
8888

8989

0 commit comments

Comments
 (0)