Files
make-cad/src/simplecadapi/operators/draft.py
T
NiJingzhe 112c404d56 release: 2.2.6.post2
Move scale/transform/boolean_rsolidlist/offset/draft/extrude_taper/extrude_until/
sweep_multisection into the module of their family (old module paths remain as
deprecated aliases); the API reference is generated for every operator.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 01:29:29 +08:00

28 lines
852 B
Python

"""Moved: the operators this module held live in the module of their family (``_MOVED``).
Kept so that ``from simplecadapi.operators.draft import <name>`` keeps working;
import from the package root instead, ``from simplecadapi import <name>``.
"""
from __future__ import annotations
import warnings
from importlib import import_module
_MOVED = {
"draft_rsolid": "features",
}
def __getattr__(name: str):
family = _MOVED.get(name)
if family is None:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
warnings.warn(
f"{__name__}.{name} moved to simplecadapi.operators.{family}; "
f"import it from simplecadapi instead (from simplecadapi import {name})",
DeprecationWarning,
stacklevel=2,
)
return getattr(import_module(f"simplecadapi.operators.{family}"), name)