Merge pull request #24262 from mnesarco/pyi-fixes-1

This commit is contained in:
Chris Hennes
2025-11-29 20:23:37 -06:00
committed by GitHub
250 changed files with 2821 additions and 2051 deletions

View File

@@ -1,3 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from Base.Metadata import constmethod
@@ -10,7 +14,7 @@ from typing import Final, List, Any
Namespace="Materials",
Include="Mod/Material/App/MaterialValue.h",
Delete=True,
Constructor=True
Constructor=True,
)
class Array2D(BaseClass):
"""
@@ -33,20 +37,20 @@ class Array2D(BaseClass):
"""The number of columns in the array."""
@constmethod
def getRow(self, value: Any) -> Any:
def getRow(self, value: Any, /) -> Any:
"""
Get the row given the first column value
"""
...
@constmethod
def getValue(self, row: int, column: int) -> Any:
def getValue(self, row: int, column: int, /) -> Any:
"""
Get the value at the given row and column
"""
...
def setValue(self, row: int, column: int, value: Any):
def setValue(self, row: int, column: int, value: Any, /):
"""
Set the value at the given row and column
"""

View File

@@ -1,3 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, constmethod
from Base.BaseClass import BaseClass
from typing import Any, Final, List
@@ -9,7 +13,7 @@ from typing import Any, Final, List
Namespace="Materials",
Include="Mod/Material/App/MaterialValue.h",
Delete=True,
Constructor=True
Constructor=True,
)
class Array3D(BaseClass):
"""
@@ -52,19 +56,19 @@ class Array3D(BaseClass):
"""
...
def setDepthValue(self, value: Any):
def setDepthValue(self, value: Any, /):
"""
Set the column value at the given depth
"""
...
def setValue(self, depth: int, row: int, column: int, value: Any):
def setValue(self, depth: int, row: int, column: int, value: Any, /):
"""
Set the value at the given depth, row, and column
"""
...
def setRows(self, depth: int, value: int):
def setRows(self, depth: int, value: int, /):
"""
Set the number of rows at the given depth
"""

View File

@@ -1,6 +1,10 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, no_args, sequence_protocol
from Base.BaseClass import BaseClass
from typing import Final, Dict
from typing import Final
@export(

View File

@@ -1,4 +1,8 @@
from Base.Metadata import export, constmethod
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from typing import List
@@ -24,4 +28,4 @@ class MaterialFilter(BaseClass):
"""Materials must include the specified models."""
RequiredCompleteModels: List = ...
"""Materials must have complete versions of the specified models."""
"""Materials must have complete versions of the specified models."""

View File

@@ -1,3 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
@@ -6,7 +10,7 @@ from Base.BaseClass import BaseClass
Include="Mod/Material/App/MaterialFilter.h",
Namespace="Materials",
Constructor=True,
Delete=True
Delete=True,
)
class MaterialFilterOptions(BaseClass):
"""

View File

@@ -1,6 +1,10 @@
from Base.Metadata import export, constmethod
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from typing import Final
@export(
Include="Mod/Material/App/MaterialLibrary.h",

View File

@@ -1,16 +1,17 @@
from Base.Metadata import export, constmethod
from Base.BaseClass import BaseClass
from typing import Final, List, Dict, overload
# SPDX-License-Identifier: LGPL-2.1-or-later
@export(
Include="Mod/Material/App/MaterialManager.h",
Namespace="Materials",
Constructor=True
)
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from typing import Final, List, Dict
@export(Include="Mod/Material/App/MaterialManager.h", Namespace="Materials", Constructor=True)
class MaterialManager(BaseClass):
"""
Material descriptions.
Author: DavidCarter (dcarter@davidcarter.ca)
Licence: LGPL
"""
@@ -67,4 +68,4 @@ class MaterialManager(BaseClass):
"""
Refreshes the material tree. Use sparingly as this is an expensive operation.
"""
...
...

View File

@@ -1,7 +1,12 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from ModelProperty import ModelProperty
from typing import Final
@export(
Include="Mod/Material/App/Materials.h",
Namespace="Materials",
@@ -13,7 +18,7 @@ from typing import Final
class MaterialProperty(ModelProperty):
"""
Material property descriptions.
Author: DavidCarter (dcarter@davidcarter.ca)
Licence: LGPL
"""

View File

@@ -1,6 +1,11 @@
from Base.Metadata import export, constmethod
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from typing import Final, List, Dict, overload
from typing import Final, List, Dict
@export(
Include="Mod/Material/App/Model.h",
@@ -15,49 +20,49 @@ class Model(BaseClass):
Author: DavidCarter (dcarter@davidcarter.ca)
Licence: LGPL
"""
LibraryName: Final[str] = ""
"""Model library name."""
LibraryRoot: Final[str] = ""
"""Model library path."""
LibraryIcon: Final[bytes] = ""
"""Model icon."""
Name: str = ""
"""Model name."""
Type: str = ""
"""Model type."""
Directory: str = ""
"""Model directory."""
UUID: Final[str] = ""
"""Unique model identifier."""
Description: str = ""
"""Description of the model."""
URL: str = ""
"""URL to a detailed description of the model."""
DOI: str = ""
"""Digital Object Identifier (see https://doi.org/)"""
Inherited: Final[List[str]] = []
"""List of inherited models identified by UUID."""
Properties: Final[Dict[str, str]] = {}
"""Dictionary of model properties."""
def addInheritance(self) -> None:
"""
Add an inherited model.
"""
...
def addProperty(self) -> None:
"""
Add a model property.

View File

@@ -1,12 +1,13 @@
from Base.Metadata import export, constmethod
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from typing import Final, List, Dict
@export(
Include="Mod/Material/App/ModelManager.h",
Namespace="Materials",
Constructor=True
)
@export(Include="Mod/Material/App/ModelManager.h", Namespace="Materials", Constructor=True)
class ModelManager(BaseClass):
"""
Material model descriptions.
@@ -24,13 +25,13 @@ class ModelManager(BaseClass):
Models: Final[Dict] = ...
"""List of model libraries."""
def getModel(self) -> ...:
def getModel(self) ->...:
"""
Get a model object by specifying its UUID
"""
...
def getModelByPath(self) -> ...:
def getModelByPath(self) ->...:
"""
Get a model object by specifying its path
"""

View File

@@ -1,4 +1,8 @@
from Base.Metadata import export, constmethod
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from typing import Final

View File

@@ -1,7 +1,12 @@
from Base.Metadata import export, constmethod
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export
from Base.BaseClass import BaseClass
from typing import Final
@export(
PythonName="Material.UUIDs",
Twin="ModelUUIDs",
@@ -14,7 +19,7 @@ from typing import Final
class UUIDs(BaseClass):
"""
Material model UUID identifiers.
Author: DavidCarter (dcarter@davidcarter.ca)
Licence: LGPL
"""

View File

@@ -1,6 +1,12 @@
from Metadata import export, constmethod, forward_declarations, class_declarations, sequence_protocol
# SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Metadata import (
export,
)
from Base.BaseClass import BaseClass
from typing import Final, overload
@export(
Twin="MaterialTreeWidget",