Skip to content

Commit

Permalink
remove name and attributes from base data structure class
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Jan 4, 2024
1 parent e2484c6 commit 804a8ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Added

* Added `viewerinstance` in `compas.scene.Scene` to support viewers context detection.
* Added `compas_rhino8` as starting point for Rhino8 support.
* Added `compas.scene.SceneObjectNode`.
Expand Down Expand Up @@ -51,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed

* Removed `compas_rhino.forms`. Forms will be moved to `compas_ui`.
* Removed `compas.datastructures.Datastructure.attributes` and `compas.datastructures.Datastructure.name` (moved to `compas.data.Data`).

## [2.0.0-beta.1] 2023-12-20

Expand Down
11 changes: 1 addition & 10 deletions src/compas/datastructures/datastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,5 @@
class Datastructure(Data):
"""Base class for all data structures."""

def __init__(self, name=None, **kwargs):
def __init__(self, **kwargs):
super(Datastructure, self).__init__(**kwargs)
self.attributes = {"name": name or self.__class__.__name__}

@property
def name(self):
return self.attributes.get("name") or self.__class__.__name__

@name.setter
def name(self, value):
self.attributes["name"] = value

0 comments on commit 804a8ef

Please sign in to comment.