From bd5f5a30b3ccbea53168b4da033e8aa1d758aaac Mon Sep 17 00:00:00 2001 From: Andrej Date: Thu, 29 May 2025 18:07:22 +0500 Subject: [PATCH] validate_stub - also skip `object` --- .../ifcopenshell/util/scripts/validate_stub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py b/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py index 3b90fc1c03..5ed734921e 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py +++ b/src/ifcopenshell-python/ifcopenshell/util/scripts/validate_stub.py @@ -81,7 +81,7 @@ def get_names_tree_lines(tree: ast.Module) -> list[str]: if isinstance(node, ast.ClassDef): # Skip `object_` as it's just a reference to `object`, # which is implied by default. - bases = [b.id for b in node.bases if isinstance(b, ast.Name) and b.id != "_object"] + bases = [b.id for b in node.bases if isinstance(b, ast.Name) and b.id not in ("_object", "object")] bases_str = f"({', '.join(bases)})" if bases else "" node_name = f"class {node.name}{bases_str}:"