[CHORE] update mypy and new issues (#1892)
* [CHORE] update mypy and new issues lnbits/cache.py:21: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] lnbits/extension_manager.py:210: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] lnbits/db.py:110: error: Only instance methods can be decorated with @property [misc] lnbits/tasks.py:152: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] lnbits/tasks.py:171: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] lnbits/core/services.py:520: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] lnbits/app.py:520: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] lnbits/app.py:525: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] lnbits/app.py:532: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] * fix db.py * fix mypy notes, type were not needed
This commit is contained in:
+3
-3
@@ -518,19 +518,19 @@ def configure_logger() -> None:
|
||||
class Formatter:
|
||||
def __init__(self):
|
||||
self.padding = 0
|
||||
self.minimal_fmt: str = (
|
||||
self.minimal_fmt = (
|
||||
"<green>{time:YYYY-MM-DD HH:mm:ss.SS}</green> | <level>{level}</level> | "
|
||||
"<level>{message}</level>\n"
|
||||
)
|
||||
if settings.debug:
|
||||
self.fmt: str = (
|
||||
self.fmt = (
|
||||
"<green>{time:YYYY-MM-DD HH:mm:ss.SS}</green> | "
|
||||
"<level>{level: <4}</level> | "
|
||||
"<cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> | "
|
||||
"<level>{message}</level>\n"
|
||||
)
|
||||
else:
|
||||
self.fmt: str = self.minimal_fmt
|
||||
self.fmt = self.minimal_fmt
|
||||
|
||||
def format(self, record):
|
||||
function = "{function}".format(**record)
|
||||
|
||||
Reference in New Issue
Block a user