diff --git a/speasy/common/variable.py b/speasy/common/variable.py index 6927c3ee..94a933cf 100644 --- a/speasy/common/variable.py +++ b/speasy/common/variable.py @@ -1,2 +1,2 @@ # For backward compatibility only, cached variables with previous version need this to be loaded -from ..products import SpeasyVariable +from ..products import SpeasyVariable # lgtm [py/unused-import] diff --git a/speasy/inventory/data_tree.py b/speasy/inventory/data_tree.py index 940eda23..a79e36a6 100644 --- a/speasy/inventory/data_tree.py +++ b/speasy/inventory/data_tree.py @@ -18,4 +18,5 @@ def empty_ssc_inventory(): def reset_amda_inventory(): + global amda amda = empty_amda_inventory() diff --git a/speasy/inventory/indexes.py b/speasy/inventory/indexes.py index cfb07651..e444ce28 100644 --- a/speasy/inventory/indexes.py +++ b/speasy/inventory/indexes.py @@ -1,4 +1,4 @@ -from typing import Optional, Any +from typing import Optional class SpeasyIndex: diff --git a/speasy/webservices/amda/indexes.py b/speasy/webservices/amda/indexes.py index e113f021..2e6c90af 100644 --- a/speasy/webservices/amda/indexes.py +++ b/speasy/webservices/amda/indexes.py @@ -24,7 +24,7 @@ def dl_kw_args(self): return {'xmlid': self.xmlid} -class AMDATimetableIndex(AMDAIndex, TimetableIndex): +class AMDATimetableIndex(AMDAIndex, TimetableIndex): # lgtm [py/conflicting-attributes] def __init__(self, meta: Dict, is_public=True): xmlid = meta.pop('xmlid') name = meta.pop('name') @@ -33,7 +33,7 @@ def __init__(self, meta: Dict, is_public=True): flat_inventories.amda.timetables[xmlid] = self -class AMDACatalogIndex(AMDAIndex, CatalogIndex): +class AMDACatalogIndex(AMDAIndex, CatalogIndex): # lgtm [py/conflicting-attributes] def __init__(self, meta: Dict, is_public=True): xmlid = meta.pop('xmlid') name = meta.pop('name') @@ -42,7 +42,7 @@ def __init__(self, meta: Dict, is_public=True): flat_inventories.amda.catalogs[self.xmlid] = self -class AMDAComponentIndex(AMDAIndex, ComponentIndex): +class AMDAComponentIndex(AMDAIndex, ComponentIndex): # lgtm [py/conflicting-attributes] def __init__(self, meta: Dict, is_public=True): xmlid = meta.pop('xmlid') name = meta.pop('name') @@ -51,7 +51,7 @@ def __init__(self, meta: Dict, is_public=True): flat_inventories.amda.components[xmlid] = self -class AMDAParameterIndex(AMDAIndex, ParameterIndex): +class AMDAParameterIndex(AMDAIndex, ParameterIndex): # lgtm [py/conflicting-attributes] def __init__(self, meta: Dict, is_public=True): xmlid = meta.pop('xmlid') name = meta.pop('name') @@ -73,7 +73,7 @@ def __contains__(self, item): return False -class AMDADatasetIndex(AMDAIndex, DatasetIndex): +class AMDADatasetIndex(AMDAIndex, DatasetIndex): # lgtm [py/conflicting-attributes] parameters: SimpleNamespace def __init__(self, meta: Dict, is_public=True): diff --git a/speasy/webservices/amda/inventory.py b/speasy/webservices/amda/inventory.py index a22d3da5..9d3d6a0b 100644 --- a/speasy/webservices/amda/inventory.py +++ b/speasy/webservices/amda/inventory.py @@ -1,8 +1,6 @@ """Base inventory tree management """ -from typing import Dict, Sequence from types import SimpleNamespace -from ...core import listify from .indexes import AMDATimetableIndex, AMDAComponentIndex, AMDAParameterIndex, AMDADatasetIndex, AMDACatalogIndex import xml.etree.ElementTree as Et