diff --git a/src/compas_view2/app/app.py b/src/compas_view2/app/app.py index 4b88f8b54..4470afb4a 100644 --- a/src/compas_view2/app/app.py +++ b/src/compas_view2/app/app.py @@ -146,7 +146,6 @@ def __init__( flow_view_size: Union[Tuple[int], List[int]] = None, flow_auto_update: bool = True, ): - if version not in VERSIONS: raise Exception("Only these versions are currently supported: {}".format(VERSIONS)) diff --git a/src/compas_view2/app/worker.py b/src/compas_view2/app/worker.py index a30b4b6e7..91eac8216 100644 --- a/src/compas_view2/app/worker.py +++ b/src/compas_view2/app/worker.py @@ -53,7 +53,6 @@ def run(self): class Ticker(QRunnable): - pool = QThreadPool() def __init__(self, interval=1): diff --git a/src/compas_view2/flow/node.py b/src/compas_view2/flow/node.py index 7ec83963f..3abbcbbd5 100644 --- a/src/compas_view2/flow/node.py +++ b/src/compas_view2/flow/node.py @@ -43,7 +43,6 @@ def Node(app, color: Union[Color, str, list, tuple] = "#0092D2", auto_update: bo node_color = color.hex def decorator(func): - signature = inspect.signature(func) if auto_update is None: diff --git a/src/compas_view2/flow/values.py b/src/compas_view2/flow/values.py index 6cf066b91..6256e1157 100644 --- a/src/compas_view2/flow/values.py +++ b/src/compas_view2/flow/values.py @@ -52,7 +52,6 @@ def IntegerNode(title: str = "Integer", default: int = 1, bounds: Tuple[float, f bounds = bounds or (-(10**9), 10**9) class IntegerNode(ValueNode): - title = _title init_inputs = [ @@ -88,7 +87,6 @@ def FloatNode(title: str = "Float", default: float = 0.0, bounds: tuple = None) bounds = bounds or (-(10**9), 10**9) class FloatNode(ValueNode): - title = _title init_inputs = [ @@ -124,7 +122,6 @@ def ChoiceNode(title: str = "Choice", default: str = None, items: List[str] = No items = items or [] class ChoiceNode(ValueNode): - title = _title init_inputs = [ @@ -156,7 +153,6 @@ def StringNode(title: str = "String", default: str = None) -> ValueNode: _title = title class StringNode(ValueNode): - title = _title init_inputs = [ @@ -191,7 +187,6 @@ def VectorNode( default = default or [0, 0, 0] class VectorNode(ValueNode): - title = _title init_inputs = [ diff --git a/src/compas_view2/flow/widgets.py b/src/compas_view2/flow/widgets.py index fd6e59429..6383cd6f1 100644 --- a/src/compas_view2/flow/widgets.py +++ b/src/compas_view2/flow/widgets.py @@ -48,7 +48,6 @@ def set_message(self, message=None): self.message.setVisible(False) def set_auto_update(self, _, value=None, update_node=True): - if self.pause_event: return diff --git a/src/compas_view2/forms/sceneform.py b/src/compas_view2/forms/sceneform.py index 5a8030b49..1c495e61f 100644 --- a/src/compas_view2/forms/sceneform.py +++ b/src/compas_view2/forms/sceneform.py @@ -30,7 +30,6 @@ def map_objects(self, objects, parent=None): self.map_objects(obj.children, item) def show_properties(self, obj): - self.app.selector.select(obj, update=True) propertyform = self.app.dock_slots.get("propertyform") diff --git a/src/compas_view2/forms/treeform.py b/src/compas_view2/forms/treeform.py index e0a7f934e..8dfc514d3 100644 --- a/src/compas_view2/forms/treeform.py +++ b/src/compas_view2/forms/treeform.py @@ -118,7 +118,6 @@ def entries(self): return list(map(lambda i: i.entry, self.items)) def map_entries(self, entries, parent=None): - # automatically convert dict to list of key, value pairs if isinstance(entries, dict): _entries = [] diff --git a/src/compas_view2/objects/collectionobject.py b/src/compas_view2/objects/collectionobject.py index fbd7670d9..76a9de775 100644 --- a/src/compas_view2/objects/collectionobject.py +++ b/src/compas_view2/objects/collectionobject.py @@ -9,7 +9,6 @@ class CollectionObject(BufferObject): """Object for displaying COMPAS collection.""" def __init__(self, collection: Collection, **kwargs): - super().__init__(collection, **kwargs) self._objects = [] diff --git a/src/compas_view2/objects/object.py b/src/compas_view2/objects/object.py index afb3fbcce..31c7c8ba6 100644 --- a/src/compas_view2/objects/object.py +++ b/src/compas_view2/objects/object.py @@ -172,7 +172,6 @@ def __init__( pointsize: int = 10, opacity: float = 1.0, ): - self._data = data self._app = app self.name = name or str(self) diff --git a/src/compas_view2/scene/camera.py b/src/compas_view2/scene/camera.py index 9eaf4bc02..c133c4578 100644 --- a/src/compas_view2/scene/camera.py +++ b/src/compas_view2/scene/camera.py @@ -349,7 +349,6 @@ def viewworld(self): return asfortranarray(W.inverted(), dtype=float32) def zoom_extents(self, objects: List[Object] = None): - objects = objects or self.view.objects.values() extents = [] diff --git a/src/compas_view2/shapes/arrow.py b/src/compas_view2/shapes/arrow.py index d748c76a4..e779b5f8d 100644 --- a/src/compas_view2/shapes/arrow.py +++ b/src/compas_view2/shapes/arrow.py @@ -156,7 +156,6 @@ def transform(self, transformation): # ============================================================================== if __name__ == "__main__": - import doctest doctest.testmod() diff --git a/src/compas_view2/ui/checkbox.py b/src/compas_view2/ui/checkbox.py index 31ca4416a..a1563b229 100644 --- a/src/compas_view2/ui/checkbox.py +++ b/src/compas_view2/ui/checkbox.py @@ -28,7 +28,6 @@ class Checkbox: """ def __init__(self, app, parent, *, text, action, checked=False): - box = QtWidgets.QWidget() layout = QtWidgets.QHBoxLayout() checkbox = QtWidgets.QCheckBox(text) diff --git a/src/compas_view2/ui/radio.py b/src/compas_view2/ui/radio.py index 1846f8a8c..2f5ffb424 100644 --- a/src/compas_view2/ui/radio.py +++ b/src/compas_view2/ui/radio.py @@ -40,7 +40,6 @@ class Radio: """ def __init__(self, app, parent, *, title, items, action): - box = QtWidgets.QGroupBox(title) layout = QtWidgets.QVBoxLayout() group = QtWidgets.QButtonGroup(app.window, exclusive=True) diff --git a/src/compas_view2/ui/select.py b/src/compas_view2/ui/select.py index 47b7b4642..ddf184934 100644 --- a/src/compas_view2/ui/select.py +++ b/src/compas_view2/ui/select.py @@ -34,7 +34,6 @@ class Select: """ def __init__(self, app, parent, *, items, action): - container = QtWidgets.QWidget() layout = QtWidgets.QHBoxLayout() combo = QtWidgets.QComboBox()