3
0
Fork 0

fix: fix 'missing-function-docstring' for pylint

This commit is contained in:
Lance Edgar 2025-08-30 20:19:26 -05:00
parent baa291f289
commit 967c7b5948
3 changed files with 17 additions and 8 deletions

View file

@ -18,6 +18,7 @@ enable=anomalous-backslash-in-string,
inconsistent-return-statements, inconsistent-return-statements,
invalid-name, invalid-name,
line-too-long, line-too-long,
missing-function-docstring,
no-else-return, no-else-return,
redefined-argument-from-local, redefined-argument-from-local,
too-few-public-methods, too-few-public-methods,

View file

@ -201,7 +201,8 @@ class BatchMixin:
) )
@declared_attr @declared_attr
def batch_type(cls): def batch_type(cls): # pylint: disable=empty-docstring
""" """
return cls.__tablename__ return cls.__tablename__
uuid = uuid_column() uuid = uuid_column()
@ -227,7 +228,8 @@ class BatchMixin:
created_by_uuid = sa.Column(UUID(), nullable=False) created_by_uuid = sa.Column(UUID(), nullable=False)
@declared_attr @declared_attr
def created_by(cls): def created_by(cls): # pylint: disable=empty-docstring
""" """
return orm.relationship( return orm.relationship(
User, User,
primaryjoin=lambda: User.uuid == cls.created_by_uuid, primaryjoin=lambda: User.uuid == cls.created_by_uuid,
@ -239,7 +241,8 @@ class BatchMixin:
executed_by_uuid = sa.Column(UUID(), nullable=True) executed_by_uuid = sa.Column(UUID(), nullable=True)
@declared_attr @declared_attr
def executed_by(cls): def executed_by(cls): # pylint: disable=empty-docstring
""" """
return orm.relationship( return orm.relationship(
User, User,
primaryjoin=lambda: User.uuid == cls.executed_by_uuid, primaryjoin=lambda: User.uuid == cls.executed_by_uuid,
@ -395,7 +398,8 @@ class BatchRowMixin: # pylint: disable=too-few-public-methods
batch_uuid = sa.Column(UUID(), nullable=False) batch_uuid = sa.Column(UUID(), nullable=False)
@declared_attr @declared_attr
def batch(cls): def batch(cls): # pylint: disable=empty-docstring
""" """
batch_class = cls.__batch_class__ batch_class = cls.__batch_class__
row_class = cls row_class = cls
batch_class.__row_class__ = row_class batch_class.__row_class__ = row_class

View file

@ -229,7 +229,8 @@ class InstallHandler(GenericHandler):
return dbinfo return dbinfo
def make_db_url(self, dbtype, dbhost, dbport, dbname, dbuser, dbpass): def make_db_url(self, dbtype, dbhost, dbport, dbname, dbuser, dbpass): # pylint: disable=empty-docstring
""" """
from sqlalchemy.engine import URL from sqlalchemy.engine import URL
if dbtype == 'mysql': if dbtype == 'mysql':
@ -244,7 +245,8 @@ class InstallHandler(GenericHandler):
port=dbport, port=dbport,
database=dbname) database=dbname)
def test_db_connection(self, url): def test_db_connection(self, url): # pylint: disable=empty-docstring
""" """
import sqlalchemy as sa import sqlalchemy as sa
engine = sa.create_engine(url) engine = sa.create_engine(url)
@ -470,7 +472,8 @@ class InstallHandler(GenericHandler):
# console utility functions # console utility functions
############################## ##############################
def require_prompt_toolkit(self, answer=None): def require_prompt_toolkit(self, answer=None): # pylint: disable=empty-docstring
""" """
try: try:
import prompt_toolkit # pylint: disable=unused-import import prompt_toolkit # pylint: disable=unused-import
except ImportError: except ImportError:
@ -492,7 +495,8 @@ class InstallHandler(GenericHandler):
""" """
rich.print(*args, **kwargs) rich.print(*args, **kwargs)
def get_prompt_style(self): def get_prompt_style(self): # pylint: disable=empty-docstring
""" """
from prompt_toolkit.styles import Style from prompt_toolkit.styles import Style
# message formatting styles # message formatting styles