file.ctor: use swig shadowing

This commit is contained in:
Andrej730
2026-07-24 21:32:13 +05:00
parent 2b7f55c1a0
commit 018695a2a9
3 changed files with 18 additions and 6 deletions
+1 -1
View File
@@ -898,7 +898,7 @@ class file_mixin:
def _determine_schema_identifier(
schema: Optional[ifcopenshell.util.schema.IFC_SCHEMA] = None,
schema_version: Optional[tuple[int, int, int, int]] = None,
):
) -> str:
if schema_version:
prefixes = ("IFC", "X", "_ADD", "_TC")
schema = "".join("".join(map(str, t)) if t[1] else "" for t in zip(prefixes, schema_version))
@@ -21,6 +21,7 @@ from typing import Any, Literal, Sequence, Union
from typing_extensions import Self
import ifcopenshell
import ifcopenshell.util.schema
from ifcopenshell.entity_instance import entity_instance_mixin
from ifcopenshell.file import file_mixin
@@ -830,7 +831,12 @@ class face:
class file(file_mixin):
def fresh_id(self) -> int: ...
def __init__(self, *args): ...
def __init__(
self,
schema: ifcopenshell.util.schema.IFC_SCHEMA | None = None,
schema_identifier: str | None = None,
schema_version: tuple[int, int, int, int] | None = None,
): ...
def _add(self, entity: entity_instance, id: int = -1) -> entity_instance: ...
def add_type_ref(self, new_entity): ...
def batch(self) -> None: