From f86192f85a1b46950128a598f0a39a836dd529e9 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Tue, 1 Jun 2021 10:07:46 +0200 Subject: [PATCH] more cleanup --- scilog/authmixin.py | 1 - scilog/httpclient.py | 2 +- scilog/scicat.py | 1 - scilog/snippet.py | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scilog/authmixin.py b/scilog/authmixin.py index b9f0670..be0d395 100644 --- a/scilog/authmixin.py +++ b/scilog/authmixin.py @@ -22,7 +22,6 @@ class AuthMixin(ABC): tn = typename(self) return f"{tn} @ {self.address}" - @abstractmethod def authenticate(self, username, password): raise NotImplementedError diff --git a/scilog/httpclient.py b/scilog/httpclient.py index 6457e8d..2479a0c 100644 --- a/scilog/httpclient.py +++ b/scilog/httpclient.py @@ -60,7 +60,7 @@ class HttpClient(AuthMixin): def make_filter(where:dict=None, limit:int=0, skip:int=0, fields:dict=None, include:dict=None, order:list=None): filt = dict() if where is not None: - items = [{k: v} for k, v in where.items()] + items = [where.copy()] filt["where"] = {"and": items} if limit > 0: filt["limit"] = limit diff --git a/scilog/scicat.py b/scilog/scicat.py index 911e5bf..dafb22e 100644 --- a/scilog/scicat.py +++ b/scilog/scicat.py @@ -18,7 +18,6 @@ class SciCat(AuthMixin): else: return token - @property def proposals(self): url = self.address + "/proposals" diff --git a/scilog/snippet.py b/scilog/snippet.py index 3dcb985..4b82a9f 100644 --- a/scilog/snippet.py +++ b/scilog/snippet.py @@ -29,10 +29,10 @@ def property_maker(name, type_name): return prop + class Snippet: def __init__(self, **kwargs): - super().__init__() self._properties = [] self.set_properties(**kwargs)