Skip to content

Commit 30684ac

Browse files
committed
blackify examples
1 parent 7fc9df7 commit 30684ac

6 files changed

+16
-12
lines changed

examples/core_display_activate_manipulator.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
import os
44
import sys
5-
from OCC.Core.BRepPrimAPI import (
6-
BRepPrimAPI_MakeBox,
7-
BRepPrimAPI_MakeSphere)
5+
from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox, BRepPrimAPI_MakeSphere
86
from OCC.Core.gp import gp_Pnt
97
from OCC.Core.AIS import AIS_Manipulator
108
from OCC.Extend.LayerManager import Layer
119

1210
from OCC.Display.backend import load_backend
11+
1312
load_backend("qt-pyqt5")
1413
import OCC.Display.qtDisplay as qtDisplay
1514

@@ -23,6 +22,7 @@
2322
QVBoxLayout,
2423
)
2524

25+
2626
class App(QDialog):
2727
def __init__(self):
2828
super().__init__()
@@ -86,7 +86,10 @@ def activate_manipulator(self):
8686
selected = self.display.GetSelectedShape()
8787
if selected is not None:
8888
# retrieve the AIS_Shape from the selected TopoDS_Shape
89-
self.ais_element_manip, self.index_element_manip = self.layer.get_aisshape_from_topodsshape(selected)
89+
(
90+
self.ais_element_manip,
91+
self.index_element_manip,
92+
) = self.layer.get_aisshape_from_topodsshape(selected)
9093
self.shape_element_manip = selected
9194
# Create and attach a Manipulator to AIS_Shape
9295
self.manip = AIS_Manipulator()
@@ -100,8 +103,10 @@ def activate_manipulator(self):
100103
# Get the transformations done with the manipulator
101104
trsf = self.canvas.get_trsf_from_manip()
102105
# Apply the transformation to the TopoDS_Shape and replace it in the layer
103-
self.layer.update_trsf_shape(self.shape_element_manip, self.index_element_manip, trsf)
104-
self.manip.Detach()
106+
self.layer.update_trsf_shape(
107+
self.shape_element_manip, self.index_element_manip, trsf
108+
)
109+
self.manip.Detach()
105110

106111

107112
if __name__ == "__main__":

examples/core_geometry_face_recognition_from_stepfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ def exit(event=None):
138138
shp = read_step_file(
139139
os.path.join("..", "assets", "models", "face_recognition_sample_part.stp")
140140
)
141-
display.DisplayShape(shp, update=True)
141+
display.DisplayShape(shp, update=True)
142142
display.SetSelectionModeFace() # switch to Face selection mode
143143
add_menu("recognition")
144144
add_function_to_menu("recognition", recognize_batch)
145-
start_display()
145+
start_display()

examples/core_meshDS_numpy_face_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def getMesh(X=100, Y=100):
2626
x = np.linspace(-5, 5, X)
2727
y = np.linspace(-5, 5, Y)
2828
xx, yy = np.meshgrid(x, y, sparse=False)
29-
z = np.sin(xx ** 2 + yy ** 2) / (xx ** 2 + yy ** 2)
29+
z = np.sin(xx**2 + yy**2) / (xx**2 + yy**2)
3030
xyz = np.column_stack((xx.flatten(), yy.flatten(), z.flatten()))
3131
tri = Delaunay(xyz[:, :2])
3232
return xyz, tri.simplices

examples/core_meshDS_numpy_material.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def getMesh(X=100, Y=100):
2626
x = np.linspace(-5, 5, X)
2727
y = np.linspace(-5, 5, Y)
2828
xx, yy = np.meshgrid(x, y, sparse=False)
29-
z = np.sin(xx ** 2 + yy ** 2) / (xx ** 2 + yy ** 2)
29+
z = np.sin(xx**2 + yy**2) / (xx**2 + yy**2)
3030
xyz = np.column_stack((xx.flatten(), yy.flatten(), z.flatten()))
3131
tri = Delaunay(xyz[:, :2])
3232
return xyz, tri.simplices

examples/core_meshDS_numpy_node_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def getMesh(X=100, Y=100):
3434
x = np.linspace(-5, 5, X)
3535
y = np.linspace(-5, 5, Y)
3636
xx, yy = np.meshgrid(x, y, sparse=False)
37-
z = np.sin(xx ** 2 + yy ** 2) / (xx ** 2 + yy ** 2)
37+
z = np.sin(xx**2 + yy**2) / (xx**2 + yy**2)
3838
xyz = np.column_stack((xx.flatten(), yy.flatten(), z.flatten()))
3939
tri = Delaunay(xyz[:, :2])
4040
return xyz, tri.simplices

examples/core_visualization_overpaint_viewer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ def mouseMoveEvent(self, event):
347347
self.update()
348348

349349
def wheelEvent(self, event):
350-
351350
if self._have_pyqt5:
352351
delta = event.angleDelta().y()
353352
else:

0 commit comments

Comments
 (0)