Skip to content

Commit

Permalink
using default_factory in default config
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkasirer committed Mar 13, 2024
1 parent 98638f6 commit c9fd904
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

* Fixed `ValueError` when starting viewer for the first time with default config.

### Removed


Expand Down
2 changes: 1 addition & 1 deletion src/compas_notebook/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CameraConfig:
@dataclass
class ViewConfig:
viewport: Literal["top", "perspective"] = "perspective"
background: Color = Color.from_hex("#eeeeee")
background: Color = field(default_factory=lambda: Color.from_hex("#eeeeee"))
width: float = 1100
height: float = 580
show_grid: bool = True
Expand Down

0 comments on commit c9fd904

Please sign in to comment.