Skip to content

Commit

Permalink
[lgtm] fixes few actual errors and mute some false positives
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
  • Loading branch information
jeandet committed Oct 7, 2021
1 parent 8ba0eea commit c2d5e21
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion speasy/common/variable.py
Original file line number Diff line number Diff line change
@@ -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]
1 change: 1 addition & 0 deletions speasy/inventory/data_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ def empty_ssc_inventory():


def reset_amda_inventory():
global amda
amda = empty_amda_inventory()
2 changes: 1 addition & 1 deletion speasy/inventory/indexes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, Any
from typing import Optional


class SpeasyIndex:
Expand Down
10 changes: 5 additions & 5 deletions speasy/webservices/amda/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand All @@ -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')
Expand All @@ -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')
Expand All @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions speasy/webservices/amda/inventory.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit c2d5e21

Please sign in to comment.