mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 19:54:07 +00:00
Fix type hints #2350 for python <3.10
This commit is contained in:
@@ -83,7 +83,7 @@ class SchemaError(Error):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def guess_format(path):
|
def guess_format(path: Path) -> "str | None":
|
||||||
"""Try to guess format using file extension"""
|
"""Try to guess format using file extension"""
|
||||||
if path.suffix.lower() in (".ifczip", ".zip"):
|
if path.suffix.lower() in (".ifczip", ".zip"):
|
||||||
return ".ifcZIP"
|
return ".ifcZIP"
|
||||||
@@ -91,7 +91,7 @@ def guess_format(path):
|
|||||||
return ".ifcXML"
|
return ".ifcXML"
|
||||||
|
|
||||||
|
|
||||||
def open(path: os.PathLike | str, format: str = None) -> file:
|
def open(path: "os.PathLike | str", format: str = None) -> file:
|
||||||
"""Loads an IFC dataset from a filepath
|
"""Loads an IFC dataset from a filepath
|
||||||
|
|
||||||
You can specify a file format. If no format is given, it is guessed from its extension.
|
You can specify a file format. If no format is given, it is guessed from its extension.
|
||||||
|
|||||||
Reference in New Issue
Block a user