more cleanup
This commit is contained in:
@ -22,7 +22,6 @@ class AuthMixin(ABC):
|
||||
tn = typename(self)
|
||||
return f"{tn} @ {self.address}"
|
||||
|
||||
|
||||
@abstractmethod
|
||||
def authenticate(self, username, password):
|
||||
raise NotImplementedError
|
||||
|
@ -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
|
||||
|
@ -18,7 +18,6 @@ class SciCat(AuthMixin):
|
||||
else:
|
||||
return token
|
||||
|
||||
|
||||
@property
|
||||
def proposals(self):
|
||||
url = self.address + "/proposals"
|
||||
|
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user