mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
ifc.resolve_uri - remove redundant second check
os.path.isabs(uri) is already checked at the beginning of the function
This commit is contained in:
@@ -196,13 +196,13 @@ class Ifc(bonsai.core.tool.Ifc):
|
||||
IfcStore.edited_objs.discard(obj)
|
||||
|
||||
@classmethod
|
||||
def resolve_uri(cls, uri):
|
||||
def resolve_uri(cls, uri: str) -> str:
|
||||
if os.path.isabs(uri):
|
||||
return uri
|
||||
ifc_path = cls.get_path()
|
||||
if os.path.isfile(ifc_path):
|
||||
ifc_path = os.path.dirname(ifc_path)
|
||||
return (uri if not uri or os.path.isabs(uri) else os.path.join(ifc_path, uri)).replace("\\", "/")
|
||||
return (uri if not uri else os.path.join(ifc_path, uri)).replace("\\", "/")
|
||||
|
||||
@classmethod
|
||||
def get_relative_uri(cls, uri):
|
||||
|
||||
Reference in New Issue
Block a user