diff --git a/.flake8 b/.flake8 index 532b94f00..6c11afadb 100644 --- a/.flake8 +++ b/.flake8 @@ -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 diff --git a/lnbits/app.py b/lnbits/app.py index 03dff297f..f8bfd4480 100644 --- a/lnbits/app.py +++ b/lnbits/app.py @@ -428,7 +428,10 @@ class Formatter: self.padding = 0 self.minimal_fmt: str = "{time:YYYY-MM-DD HH:mm:ss.SS} | {level} | {message}\n" if settings.debug: - self.fmt: str = "{time:YYYY-MM-DD HH:mm:ss.SS} | {level: <4} | {name}:{function}:{line} | {message}\n" + self.fmt: str = ( + "{time:YYYY-MM-DD HH:mm:ss.SS} | {level: <4} | " + "{name}:{function}:{line} | {message}\n" + ) else: self.fmt: str = self.minimal_fmt diff --git a/lnbits/core/migrations.py b/lnbits/core/migrations.py index 4e84ef85e..b66fa6969 100644 --- a/lnbits/core/migrations.py +++ b/lnbits/core/migrations.py @@ -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( diff --git a/lnbits/core/services.py b/lnbits/core/services.py index 9b699571f..49ae4ef5a 100644 --- a/lnbits/core/services.py +++ b/lnbits/core/services.py @@ -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 diff --git a/lnbits/wallets/void.py b/lnbits/wallets/void.py index b74eb2450..c109ddd00 100644 --- a/lnbits/wallets/void.py +++ b/lnbits/wallets/void.py @@ -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: