Skip to content

Commit

Permalink
adding spaces in function sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex committed Dec 2, 2024
1 parent 9e9f6eb commit f2da463
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 2 additions & 4 deletions python/nistoar/midas/dbio/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions python/nistoar/midas/dbio/inmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down Expand Up @@ -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.
Expand All @@ -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: {},
Expand All @@ -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)

0 comments on commit f2da463

Please sign in to comment.