diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py index cd87c30c69..90f72972dd 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/map_alignment_cant_segment.py @@ -22,6 +22,7 @@ from ifcopenshell.api.alignment import get_axis_subcontext from typing import Sequence import math + def _get_axis(file: ifcopenshell.file, Ds: float, rail_head_distance: float) -> entity_instance: Dy = rail_head_distance Dz = 2 * Ds diff --git a/src/ifcopenshell-python/ifcopenshell/geom/main.py b/src/ifcopenshell-python/ifcopenshell/geom/main.py index 037eba1317..fa0db6a2c7 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/main.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/main.py @@ -252,17 +252,17 @@ class settings_mixin: group = parser.add_mutually_exclusive_group() group.add_argument( f"--{nm}", - dest=nm.replace('-', '_'), + dest=nm.replace("-", "_"), action="store_true", ) group.add_argument( f"--no-{nm}", - dest=nm.replace('-', '_'), + dest=nm.replace("-", "_"), action="store_false", ) - parser.set_defaults(**{nm.replace('-', '_'): None}) + parser.set_defaults(**{nm.replace("-", "_"): None}) else: - parser.add_argument(f"--{nm}", dest=nm.replace('-', '_'), type=type_factories[ty]) + parser.add_argument(f"--{nm}", dest=nm.replace("-", "_"), type=type_factories[ty]) def apply_namespace(self, namespace) -> None: """ @@ -271,8 +271,8 @@ class settings_mixin: """ names = set(self.setting_names()) for k, v in namespace._get_kwargs(): - if k.replace('_', '-') in names and v is not None: - self.set(k.replace('_', '-'), v) + if k.replace("_", "-") in names and v is not None: + self.set(k.replace("_", "-"), v) class serializer_settings(settings_mixin, ifcopenshell_wrapper.SerializerSettings):