more cleanup

This commit is contained in:
2021-06-01 10:07:46 +02:00
parent 4f84b39264
commit f86192f85a
4 changed files with 2 additions and 4 deletions

View File

@ -22,7 +22,6 @@ class AuthMixin(ABC):
tn = typename(self)
return f"{tn} @ {self.address}"
@abstractmethod
def authenticate(self, username, password):
raise NotImplementedError

View File

@ -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

View File

@ -18,7 +18,6 @@ class SciCat(AuthMixin):
else:
return token
@property
def proposals(self):
url = self.address + "/proposals"

View File

@ -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)