mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +00:00
Fix lint failures and add missing pyparsing dependency (#8048)
* unblock voxel schema loading, add test for express * Apply black formatting * Fix lint failures and add missing pyparsing dependency * align ty -> 0.0.34
This commit is contained in:
@@ -468,7 +468,11 @@ class ChangeExtrusionXAngle(bpy.types.Operator, tool.Ifc.Operator):
|
||||
existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, 0, tolerance=0.001) else existing_x_angle
|
||||
existing_x_angle = 0 if tool.Cad.is_x(existing_x_angle, pi, tolerance=0.001) else existing_x_angle
|
||||
|
||||
profiles = extrusion.SweptArea.Profiles if extrusion.SweptArea.is_a("IfcCompositeProfileDef") else [extrusion.SweptArea]
|
||||
profiles = (
|
||||
extrusion.SweptArea.Profiles
|
||||
if extrusion.SweptArea.is_a("IfcCompositeProfileDef")
|
||||
else [extrusion.SweptArea]
|
||||
)
|
||||
for profile in profiles:
|
||||
coord_list = builder.get_polyline_coords(profile.OuterCurve)
|
||||
coord_list = [
|
||||
|
||||
@@ -17,20 +17,20 @@
|
||||
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import test.bim.bootstrap
|
||||
import ifcopenshell.api.cost
|
||||
|
||||
import bonsai.core.tool
|
||||
import bonsai.tool as tool
|
||||
import test.bim.bootstrap
|
||||
from bonsai.tool.cost import Cost as subject
|
||||
from test.bim.bootstrap import NewFile
|
||||
|
||||
from bonsai.tool.cost import Cost as subject
|
||||
|
||||
class TestImplementsTool(NewFile):
|
||||
def test_run(self):
|
||||
assert isinstance(subject(), bonsai.core.tool.Cost)
|
||||
|
||||
|
||||
class TestDisableEditingCostItemParent(NewFile):
|
||||
def test_avoid_recursion_error(newfile, monkeypatch):
|
||||
class DummyProps:
|
||||
@@ -39,11 +39,7 @@ class TestDisableEditingCostItemParent(NewFile):
|
||||
self.active_cost_item_id = 5
|
||||
|
||||
props = DummyProps()
|
||||
monkeypatch.setattr(
|
||||
"bonsai.tool.Cost.get_cost_props",
|
||||
lambda: props
|
||||
)
|
||||
monkeypatch.setattr("bonsai.tool.Cost.get_cost_props", lambda: props)
|
||||
subject.disable_editing_cost_item_parent()
|
||||
assert props.active_cost_item_id == 0
|
||||
assert props.change_cost_item_parent is not False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user