reduce max string length

This commit is contained in:
dni ⚡ 2023-04-17 08:29:01 +02:00
parent 0af22a6256
commit 0b596c00ca
No known key found for this signature in database
GPG Key ID: 886317704CC4E618
5 changed files with 13 additions and 7 deletions

View File

@ -1,5 +1,5 @@
[flake8]
max-line-length = 300
max-line-length = 150
exclude = lnbits/wallets/lnd_grpc_files/, lnbits/extensions/
ignore =
# E402: module level import not at top of file

View File

@ -428,7 +428,10 @@ class Formatter:
self.padding = 0
self.minimal_fmt: str = "<green>{time:YYYY-MM-DD HH:mm:ss.SS}</green> | <level>{level}</level> | <level>{message}</level>\n"
if settings.debug:
self.fmt: str = "<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"
self.fmt: str = (
"<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

View File

@ -168,7 +168,8 @@ async def m004_ensure_fees_are_always_negative(db):
async def m005_balance_check_balance_notify(db):
"""
Keep track of balanceCheck-enabled lnurl-withdrawals to be consumed by an LNbits wallet and of balanceNotify URLs supplied by users to empty their wallets.
Keep track of balanceCheck-enabled lnurl-withdrawals to be consumed by an
LNbits wallet and of balanceNotify URLs supplied by users to empty their wallets.
"""
await db.execute(

View File

@ -334,7 +334,8 @@ async def perform_lnurlauth(
def encode_strict_der(r: int, s: int, order: int):
# if s > order/2 verification will fail sometimes
# so we must fix it here (see https://github.com/indutny/elliptic/blob/e71b2d9359c5fe9437fbf46f1f05096de447de57/lib/elliptic/ec/index.js#L146-L147)
# so we must fix it here see:
# https://github.com/indutny/elliptic/blob/e71b2d9359c5fe9437fbf46f1f05096de447de57/lib/elliptic/ec/index.js#L146-L147
if s > order // 2:
s = order - s

View File

@ -23,9 +23,10 @@ class VoidWallet(Wallet):
raise Unsupported("")
async def status(self) -> StatusResponse:
logger.warning(
"This backend does nothing, it is here just as a placeholder, you must configure an actual backend before being able to do anything useful with LNbits."
)
logger.warning((
"This backend does nothing, it is here just as a placeholder, you must configure an "
"actual backend before being able to do anything useful with LNbits."
))
return StatusResponse(None, 0)
async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse: