Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion negpy/domain/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,13 @@ def from_flat_dict(cls, data: Dict[str, Any]) -> "WorkspaceConfig":
for cc in config_classes:
valid_keys.update(cc.__dataclass_fields__.keys())

unknown = set(data) - valid_keys
# Fields deliberately removed from the config over time. Every edit saved
# before the removal still carries them, so they'd otherwise warn on every
# file load; drop silently and keep the warning for truly unknown keys.
# surround: dim-surround print gamma, removed in #432 (replaced by Snap).
legacy_keys = {"surround"}

unknown = set(data) - valid_keys - legacy_keys
if unknown:
logger.warning("Dropping unknown config keys: %s", sorted(unknown))

Expand Down
Loading