refactor: Update the type annotation in Migrate.py to be a literal

This commit is contained in:
Blender Defender
2024-07-25 19:19:21 +02:00
committed by Dion Moult
parent a252b459a2
commit fad4ea82a7
+8 -1
View File
@@ -18,11 +18,18 @@
import ifcopenshell import ifcopenshell
import ifcopenshell.util.schema import ifcopenshell.util.schema
import typing
from logging import Logger from logging import Logger
class Patcher: class Patcher:
def __init__(self, src: str, file: ifcopenshell.file, logger: Logger, schema: str = "IFC4"): def __init__(
self,
src: str,
file: ifcopenshell.file,
logger: Logger,
schema: typing.Literal["IFC2X3", "IFC4", "IFC4X3"] = "IFC4",
):
"""Migrate from one IFC version to another """Migrate from one IFC version to another
Note that this is experimental and will try to preserve as much data as Note that this is experimental and will try to preserve as much data as