From c33509364cb8feaedf425d1ecd3c69fa30886d80 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 18 Mar 2026 10:04:15 +0500 Subject: [PATCH] Fix error generating ifcpatch recipes docs for Bonsai tooltips Mentioned in https://github.com/IfcOpenShell/IfcOpenShell/issues/7667#issuecomment-4076645173 Traceback: ``` Traceback (most recent call last): File "\bonsai\bim\module\patch\prop.py", line 55, in get_ifcpatch_recipes docs = ifcpatch.extract_docs(f, "Patcher", "__init__", ("src", "file", "logger", "args")) File "\ifcpatch\__init__.py", line 168, in extract_docs spec.loader.exec_module(submodule) ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "", line 1027, in exec_module File "", line 488, in _call_with_frames_removed File "\ifcpatch/recipes/FixRevit2025TINs.py", line 31, in class Patcher: ...<509 lines>... return co / self.unit_scale File "\ifcpatch/recipes/FixRevit2025TINs.py", line 168, in Patcher def create_edges(self, obj: bpy.types.Object) -> None: ^^^ NameError: name 'bpy' is not defined File "\bonsai\bim\module\patch\prop.py", line 43, in get_ifcpatch_recipes ``` --- src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py b/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py index 4045e86aad..5d4844e779 100644 --- a/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py +++ b/src/ifcpatch/ifcpatch/recipes/FixRevit2025TINs.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcPatch. If not, see . +from __future__ import annotations import logging from typing import Optional, TYPE_CHECKING