mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 10:59:17 +00:00
Add ty to check for missing symbols and other simple errors
This commit is contained in:
@@ -26,17 +26,33 @@ import warnings
|
||||
from collections.abc import Iterable
|
||||
from typing import NamedTuple, Union
|
||||
|
||||
import OCC # pyright: ignore[reportMissingImports]
|
||||
import OCC # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import]
|
||||
from typing_extensions import assert_never
|
||||
|
||||
import ifcopenshell.ifcopenshell_wrapper as ifcopenshell_wrapper
|
||||
|
||||
try:
|
||||
from OCC.Core import AIS, BRepTools, Graphic3d, Quantity, TopoDS, V3d, gp # pyright: ignore[reportMissingImports]
|
||||
from OCC.Core import ( # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import]
|
||||
AIS,
|
||||
BRepTools,
|
||||
Graphic3d,
|
||||
Quantity,
|
||||
TopoDS,
|
||||
V3d,
|
||||
gp,
|
||||
)
|
||||
|
||||
USE_OCCT_HANDLE = False
|
||||
except ImportError:
|
||||
from OCC import AIS, BRepTools, Graphic3d, Quantity, TopoDS, V3d, gp # pyright: ignore[reportMissingImports]
|
||||
from OCC import ( # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import]
|
||||
AIS,
|
||||
BRepTools,
|
||||
Graphic3d,
|
||||
Quantity,
|
||||
TopoDS,
|
||||
V3d,
|
||||
gp,
|
||||
)
|
||||
|
||||
USE_OCCT_HANDLE = True
|
||||
|
||||
@@ -68,7 +84,7 @@ DEFAULT_STYLES = {
|
||||
|
||||
|
||||
def initialize_display():
|
||||
import OCC.Display.SimpleGui # pyright: ignore[reportMissingImports]
|
||||
import OCC.Display.SimpleGui # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import]
|
||||
|
||||
global handle, main_loop, add_menu, add_function_to_menu
|
||||
handle, main_loop, add_menu, add_function_to_menu = OCC.Display.SimpleGui.init_display()
|
||||
|
||||
Reference in New Issue
Block a user