Skip to content

Commit d956d1b

Browse files
author
Sergio García Prado
committed
ISSUE #346
* Add missing docstring.
1 parent 72d2907 commit d956d1b

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

packages/core/minos-microservice-common/minos/common/database/abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def pool(self) -> DatabaseClientPool:
219219

220220

221221
class PostgreSqlMinosDatabase(DatabaseMixin):
222-
"""TODO"""
222+
"""PostgreSql Minos Database class."""
223223

224224
def __init__(self, *args, **kwargs):
225225
warnings.warn(

packages/core/minos-microservice-common/minos/common/database/locks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
4848

4949

5050
class PostgreSqlLock(DatabaseLock):
51-
"""TODO"""
51+
"""PostgreSql Lock class."""
5252

5353
def __init__(self, *args, **kwargs):
5454
warnings.warn(f"{PostgreSqlLock!r} has been deprecated. Use {DatabaseLock} instead.", DeprecationWarning)

packages/core/minos-microservice-common/minos/common/database/pools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ async def _check_instance(self, instance: Optional[Connection]) -> bool:
102102
return not instance.closed
103103

104104

105+
@Injectable("postgresql_pool")
105106
class PostgreSqlPool(DatabaseClientPool):
106-
"""TODO"""
107+
"""PostgreSql Pool class."""
107108

108109
def __init__(self, *args, **kwargs):
109110
warnings.warn(f"{PostgreSqlPool!r} has been deprecated. Use {DatabaseClientPool} instead.", DeprecationWarning)
@@ -122,9 +123,8 @@ def acquire(self, key: Hashable, *args, **kwargs) -> DatabaseLock:
122123
return DatabaseLock(super().acquire(), key, *args, **kwargs)
123124

124125

125-
@Injectable("postgresql_pool")
126126
class PostgreSqlLockPool(DatabaseLockPool):
127-
"""TODO"""
127+
"""PostgreSql Lock Pool class"""
128128

129129
def __init__(self, *args, **kwargs):
130130
warnings.warn(

packages/core/minos-microservice-common/minos/common/pools.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
@Injectable("pool_factory")
4343
class PoolFactory(SetupMixin):
44-
"""TODO"""
44+
"""Pool Factory class."""
4545

4646
_pools: dict[str, Pool]
4747

@@ -64,12 +64,12 @@ async def _destroy(self) -> None:
6464
await super()._destroy()
6565

6666
def get_pool(self, type_: str, key: Optional[str] = None, **kwargs) -> Pool:
67-
"""TODO
67+
"""Get a pool from the factory.
6868
69-
:param type_: TODO
70-
:param key: TODO
71-
:param kwargs: TODO
72-
:return: TODO
69+
:param type_: The type of the pool.
70+
:param key: An optional key that identifies the pool.
71+
:param kwargs: Additional named arguments.
72+
:return: A ``Pool`` instance.
7373
"""
7474
if key is None:
7575
key = type_

packages/core/minos-microservice-common/tests/test_common/test_pools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030

3131
class TestPoolFactory(CommonTestCase):
32-
3332
def setUp(self):
3433
super().setUp()
3534
self.factory = PoolFactory(self.config, {"lock": FakeLockPool})

0 commit comments

Comments
 (0)