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