correct docstrings in database.py
This commit is contained in:
parent
d3d33bb718
commit
52023fcd1a
|
@ -11,7 +11,7 @@ class Database:
|
||||||
"""Implement interaction with the database."""
|
"""Implement interaction with the database."""
|
||||||
|
|
||||||
def __init__(self, dsn: str, log: Logger) -> None:
|
def __init__(self, dsn: str, log: Logger) -> None:
|
||||||
"""Create a database if not exists."""
|
"""Initialize the database"""
|
||||||
self.log: Logger = log
|
self.log: Logger = log
|
||||||
self.log.debug('Database.__init__(DSN=\'%s\')', dsn)
|
self.log.debug('Database.__init__(DSN=\'%s\')', dsn)
|
||||||
self.conn: connection = psycopg2.connect(dsn)
|
self.conn: connection = psycopg2.connect(dsn)
|
||||||
|
@ -158,7 +158,7 @@ class Database:
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
|
||||||
def __migrate(self, dsn: str) -> None:
|
def __migrate(self, dsn: str) -> None:
|
||||||
"""Migrate or initialize database shema"""
|
"""Migrate or initialize the database schema"""
|
||||||
self.log.debug(f'Database.__migrate(dsn={dsn})')
|
self.log.debug(f'Database.__migrate(dsn={dsn})')
|
||||||
backend = get_backend(dsn)
|
backend = get_backend(dsn)
|
||||||
migrations = read_migrations('./migrations')
|
migrations = read_migrations('./migrations')
|
||||||
|
|
Loading…
Reference in a new issue