From f2da4635d0bac5104fbc9c7425fad0b6fc9d11d8 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 2 Dec 2024 08:30:50 -0500 Subject: [PATCH] adding spaces in function sign --- python/nistoar/midas/dbio/base.py | 6 ++---- python/nistoar/midas/dbio/inmem.py | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/python/nistoar/midas/dbio/base.py b/python/nistoar/midas/dbio/base.py index e8ae42d..3126feb 100644 --- a/python/nistoar/midas/dbio/base.py +++ b/python/nistoar/midas/dbio/base.py @@ -827,14 +827,12 @@ class DBClient(ABC): the only allowed shoulder will be the default, ``grp0``. """ - def __init__(self, config: Mapping, projcoll: str,websocket_server: WebSocketServer, nativeclient=None, foruser: str = ANONYMOUS): + def __init__(self, config: Mapping, projcoll: str, websocket_server: WebSocketServer, nativeclient=None, foruser: str = ANONYMOUS): self._cfg = config self._native = nativeclient self._projcoll = projcoll self._who = foruser self._whogrps = None - # Get the current stack frame - stack = inspect.stack() self._dbgroups = DBGroups(self) self.websocket_server = websocket_server @@ -1300,7 +1298,7 @@ class DBClientFactory(ABC): an abstract class for creating client connections to the database """ - def __init__(self, config,websocket_server: WebSocketServer): + def __init__(self, config, websocket_server: WebSocketServer): """ initialize the factory with its configuration. The configuration provided here serves as the default parameters for the cient as these can be overridden by the configuration parameters diff --git a/python/nistoar/midas/dbio/inmem.py b/python/nistoar/midas/dbio/inmem.py index 0612655..82b65f2 100644 --- a/python/nistoar/midas/dbio/inmem.py +++ b/python/nistoar/midas/dbio/inmem.py @@ -16,9 +16,9 @@ class InMemoryDBClient(base.DBClient): an in-memory DBClient implementation """ - def __init__(self, dbdata: Mapping, config: Mapping, projcoll: str,websocket=WebSocketServer ,foruser: str = base.ANONYMOUS): + def __init__(self, dbdata: Mapping, config: Mapping, projcoll: str, websocket=WebSocketServer ,foruser: str = base.ANONYMOUS): self._db = dbdata - super(InMemoryDBClient, self).__init__(config, projcoll,websocket, self._db, foruser) + super(InMemoryDBClient, self).__init__(config, projcoll, websocket, self._db, foruser) def _next_recnum(self, shoulder): if shoulder not in self._db['nextnum']: @@ -139,7 +139,7 @@ class InMemoryDBClientFactory(base.DBClientFactory): clients it creates. """ - def __init__(self, config: Mapping,websocket_server:WebSocketServer, _dbdata = None): + def __init__(self, config: Mapping, websocket_server:WebSocketServer, _dbdata = None): """ Create the factory with the given configuration. @@ -148,7 +148,7 @@ def __init__(self, config: Mapping,websocket_server:WebSocketServer, _dbdata = N of the in-memory data structure required to use this input.) If not provided, an empty database is created. """ - super(InMemoryDBClientFactory, self).__init__(config,websocket_server) + super(InMemoryDBClientFactory, self).__init__(config, websocket_server) self.websocket_server = websocket_server self._db = { base.DAP_PROJECTS: {}, @@ -166,5 +166,5 @@ def create_client(self, servicetype: str, config: Mapping={}, foruser: str = bas cfg = merge_config(config, deepcopy(self._cfg)) if servicetype not in self._db: self._db[servicetype] = {} - return InMemoryDBClient(self._db, cfg, servicetype,self.websocket_server, foruser) + return InMemoryDBClient(self._db, cfg, servicetype, self.websocket_server, foruser)