From 5229003ec8bcafe4bff73ae19581ee7ecefbaba3 Mon Sep 17 00:00:00 2001 From: Cyril Margorin Date: Fri, 10 Nov 2023 10:33:51 +0300 Subject: [PATCH] Fix issue #731 Make base_url argument optional with default to None and replace it with Settings.baseurl if it is None (standard optional argument procedure) --- aqt/metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/metadata.py b/aqt/metadata.py index a2ac66da..9f992a76 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -521,7 +521,7 @@ def __init__( self, archive_id: ArchiveId, *, - base_url: str = Settings.baseurl, + base_url: Optional[str] = None, spec: Optional[SimpleSpec] = None, is_latest_version: bool = False, modules_query: Optional[ModulesQuery] = None, @@ -547,7 +547,7 @@ def __init__( self.logger = getLogger("aqt.metadata") self.archive_id = archive_id self.spec = spec - self.base_url = base_url + self.base_url = base_url or Settings.baseurl if archive_id.is_tools(): if tool_name is not None: