mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-23 01:49:58 +00:00
chore: Add pylint for DB-GPT core lib (#1076)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def PublicAPI(*args, **kwargs):
|
||||
"""Decorator to mark a function or class as a public API.
|
||||
|
||||
@@ -64,7 +67,7 @@ def DeveloperAPI(*args, **kwargs):
|
||||
return decorator
|
||||
|
||||
|
||||
def _modify_docstring(obj, message: str = None):
|
||||
def _modify_docstring(obj, message: Optional[str] = None):
|
||||
if not message:
|
||||
return
|
||||
if not obj.__doc__:
|
||||
@@ -81,6 +84,7 @@ def _modify_docstring(obj, message: str = None):
|
||||
|
||||
if min_indent == float("inf"):
|
||||
min_indent = 0
|
||||
min_indent = int(min_indent)
|
||||
indented_message = message.rstrip() + "\n" + (" " * min_indent)
|
||||
obj.__doc__ = indented_message + original_doc
|
||||
|
||||
|
Reference in New Issue
Block a user