From d77f57c68e9adcfaceb0d89a71ab57eef5a5d076 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 2 Sep 2024 16:33:16 +0500 Subject: [PATCH] ifc.resolve_uri - remove redundant second check os.path.isabs(uri) is already checked at the beginning of the function --- src/bonsai/bonsai/tool/ifc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/tool/ifc.py b/src/bonsai/bonsai/tool/ifc.py index af7f3a3bf9..3efad2bfa6 100644 --- a/src/bonsai/bonsai/tool/ifc.py +++ b/src/bonsai/bonsai/tool/ifc.py @@ -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):