mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-14 16:32:13 -04:00
Fix new flake8 errors (#7489)
This is a cherry-pick of 1a1da60ad2
(#7470)
to the release-v1.13.0 branch.
This commit is contained in:
parent
fa4af2c3af
commit
edd3b0747c
7 changed files with 19 additions and 12 deletions
|
@ -22,6 +22,7 @@ import sys
|
|||
import traceback
|
||||
|
||||
from daemonize import Daemonize
|
||||
from typing_extensions import NoReturn
|
||||
|
||||
from twisted.internet import defer, error, reactor
|
||||
from twisted.protocols.tls import TLSMemoryBIOFactory
|
||||
|
@ -139,9 +140,9 @@ def start_reactor(
|
|||
run()
|
||||
|
||||
|
||||
def quit_with_error(error_string):
|
||||
def quit_with_error(error_string: str) -> NoReturn:
|
||||
message_lines = error_string.split("\n")
|
||||
line_length = max(len(l) for l in message_lines if len(l) < 80) + 2
|
||||
line_length = max(len(line) for line in message_lines if len(line) < 80) + 2
|
||||
sys.stderr.write("*" * line_length + "\n")
|
||||
for line in message_lines:
|
||||
sys.stderr.write(" %s\n" % (line.rstrip(),))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue