Skip to content

Commit 5a8300d

Browse files
committed
ruff
1 parent e13c5b0 commit 5a8300d

File tree

10 files changed

+13
-23
lines changed

10 files changed

+13
-23
lines changed

src/compas_fofin/rhino/conduits/cablemeshconduit.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
from __future__ import print_function
21
from __future__ import absolute_import
32
from __future__ import division
3+
from __future__ import print_function
44

5-
from System.Drawing import Color
65
from Rhino.Geometry import Line
76
from Rhino.Geometry import Point3d
8-
9-
from compas_rhino.conduits import BaseConduit
7+
from System.Drawing import Color
108

119
from compas.geometry import add_vectors
12-
from compas.geometry import subtract_vectors
13-
from compas.geometry import scale_vector
1410
from compas.geometry import centroid_points
1511
from compas.geometry import dot_vectors
1612
from compas.geometry import length_vector_sqrd
13+
from compas.geometry import scale_vector
14+
from compas.geometry import subtract_vectors
15+
from compas_rhino.conduits import BaseConduit
1716

1817

1918
class ReactionConduit(BaseConduit):

src/compas_fofin/rhino/conversions/curves.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Rhino
22

3-
from compas_rhino.geometry import RhinoNurbsCurve
4-
from compas_rhino.conversions import curve_to_compas_line
53
from compas_rhino.conversions import circle_to_compas
4+
from compas_rhino.conversions import curve_to_compas_line
5+
from compas_rhino.geometry import RhinoNurbsCurve
66

77
# from compas_rhino.geometry import RhinoCircle
88
# from compas_rhino.geometry import RhinoEllipse

src/compas_fofin/rhino/forms/defaultattributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def show(self):
216216

217217

218218
if __name__ == "__main__":
219-
from compas.datastructures import Mesh
220219
import compas
220+
from compas.datastructures import Mesh
221221

222222
mesh = Mesh.from_obj(compas.get("faces.obj"))
223223

src/compas_fofin/rhino/forms/values/dictvalue.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ def __init__(self, value=None, dict_value_type=None):
1212
def _check_dict_value_type(self, value):
1313
for k, v in value.items():
1414
assert isinstance(k, str), "Dict key {} is not of type {}".format(k, str)
15-
assert isinstance(v, self.dict_value_type), "Dict value {}:{} is not of type {}".format(
16-
k, v, self.dict_value_type
17-
)
15+
assert isinstance(v, self.dict_value_type), "Dict value {}:{} is not of type {}".format(k, v, self.dict_value_type)
1816

1917
def check(self, value):
2018
super(DictValue, self).check(value)
@@ -24,9 +22,7 @@ def __getitem__(self, key):
2422
return self.value[key]
2523

2624
def __setitem__(self, key, value):
27-
assert isinstance(value, self.dict_value_type), "New value {} is not of type {}".format(
28-
value, self.dict_value_type
29-
)
25+
assert isinstance(value, self.dict_value_type), "New value {} is not of type {}".format(value, self.dict_value_type)
3026
self.value[key] = value
3127

3228
@property

src/compas_fofin/rhino/forms/values/listvalue.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ def __init__(self, value=None, list_value_type=None):
1111

1212
def _check_list_value_type(self, value):
1313
for i, item in enumerate(value):
14-
assert isinstance(item, self.list_value_type), "List item {}:{} is not of type {}".format(
15-
i, item, self.list_value_type
16-
)
14+
assert isinstance(item, self.list_value_type), "List item {}:{} is not of type {}".format(i, item, self.list_value_type)
1715

1816
def check(self, value):
1917
super(ListValue, self).check(value)

src/compas_fofin/rhino/forms/values/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from .value import Value
21
from .dictvalue import DictValue
2+
from .value import Value
33

44

55
class Settings(DictValue):

src/compas_fofin/rhino/forms/values/value.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def options(self):
6363

6464
@options.setter
6565
def options(self, options):
66-
assert type(options) is list, "Options must be a list"
66+
assert isinstance(options, list), "Options must be a list"
6767
for option in options:
6868
self._check_type(option)
6969
self._options = options

src/compas_fofin/rhino/scene/cablemeshobject.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717

1818
class RhinoCableMeshObject(RhinoMeshObject, CableMeshObject):
19-
2019
mesh: CableMesh
2120

2221
def __init__(

src/compas_fofin/scene/cablemeshobject.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class CableMeshObject(MeshObject):
7-
87
freecolor = ColorAttribute(default=Color.white())
98
anchorcolor = ColorAttribute(default=Color.red())
109
constraintcolor = ColorAttribute(default=Color.cyan())

src/compas_fofin/session.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class SessionError(Exception):
1616

1717

1818
class Session:
19-
2019
_instance = None
2120
_is_inited = False
2221

0 commit comments

Comments
 (0)