Skip to content

Commit 2124335

Browse files
committed
import fixes
1 parent 5b51703 commit 2124335

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

src/compas_model/models/interactiongraph.py

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
from typing import Generator
1+
# from typing import Generator
22
from typing import Optional
33

44
from compas.datastructures import Graph
55
from compas_model.elements import Element # noqa: F401
6-
from compas_model.interactions import Interaction # noqa: F401
76

87
# Ideally, graph (and mesh) are rewritten to use dedicated classes for nodes and edges.
98
# This will allow more fine-grained control over the (types of) attributes added to nodes and edges.
@@ -113,29 +112,29 @@ def node_element(self, node: int) -> Element:
113112
"""
114113
return self.node_attribute(node, "element") # type: ignore
115114

116-
def edge_interactions(self, edge: tuple[int, int]) -> list[Interaction]:
117-
"""Get the element associated with the node.
115+
# def edge_interactions(self, edge: tuple[int, int]) -> list[Interaction]:
116+
# """Get the element associated with the node.
118117

119-
Parameters
120-
----------
121-
edge : tuple[int, int]
122-
The identifier of the edge.
118+
# Parameters
119+
# ----------
120+
# edge : tuple[int, int]
121+
# The identifier of the edge.
123122

124-
Returns
125-
-------
126-
:class:`compas_model.interactions.Interaction`
123+
# Returns
124+
# -------
125+
# :class:`compas_model.interactions.Interaction`
127126

128-
"""
129-
return self.edge_attribute(edge, "interactions") # type: ignore
127+
# """
128+
# return self.edge_attribute(edge, "interactions") # type: ignore
130129

131-
def interactions(self) -> Generator[Interaction, None, None]:
132-
"""Get the interactions in the graph.
130+
# def interactions(self) -> Generator[Interaction, None, None]:
131+
# """Get the interactions in the graph.
133132

134-
Yields
135-
------
136-
:class:`compas_model.interactions.Interaction`
133+
# Yields
134+
# ------
135+
# :class:`compas_model.interactions.Interaction`
137136

138-
"""
139-
for edge in self.edges():
140-
for interaction in self.edge_interactions(edge):
141-
yield interaction
137+
# """
138+
# for edge in self.edges():
139+
# for interaction in self.edge_interactions(edge):
140+
# yield interaction

tests/test_element.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,9 @@
161161
# assert not elements[0].is_dirty
162162
# assert not elements[1].is_dirty
163163
# assert not elements[2].is_dirty
164+
165+
from compas_model.elements import Element
166+
167+
168+
def test_import():
169+
assert True

tests/test_model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@
4444
# assert c_model.graph is not None
4545
# assert c_model.tree is not None
4646
# assert len(c_model.tree.elements) == 3
47+
48+
from compas_model.models import Model
49+
50+
51+
def test_import():
52+
assert True

0 commit comments

Comments
 (0)