Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 8070b89

Browse files
authored
update black to 21.6b0 (#10197)
Reformat all files with the new version. Signed-off-by: Marcus Hoffmann <[email protected]>
1 parent 6f1a28d commit 8070b89

File tree

17 files changed

+28
-27
lines changed

17 files changed

+28
-27
lines changed

changelog.d/10197.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade `black` linting tool to 21.6b0.

contrib/experiments/cursesio.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ def set_callback(self, callback):
4646
self.callback = callback
4747

4848
def fileno(self):
49-
""" We want to select on FD 0 """
49+
"""We want to select on FD 0"""
5050
return 0
5151

5252
def connectionLost(self, reason):
5353
self.close()
5454

5555
def print_line(self, text):
56-
""" add a line to the internal list of lines"""
56+
"""add a line to the internal list of lines"""
5757

5858
self.lines.append(text)
5959
self.redraw()
@@ -92,7 +92,7 @@ def printLogLine(self, text):
9292
)
9393

9494
def doRead(self):
95-
""" Input is ready! """
95+
"""Input is ready!"""
9696
curses.noecho()
9797
c = self.stdscr.getch() # read a character
9898

@@ -132,7 +132,7 @@ def logPrefix(self):
132132
return "CursesStdIO"
133133

134134
def close(self):
135-
""" clean up """
135+
"""clean up"""
136136

137137
curses.nocbreak()
138138
self.stdscr.keypad(0)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def exec_file(path_segments):
9797
# We pin black so that our tests don't start failing on new releases.
9898
CONDITIONAL_REQUIREMENTS["lint"] = [
9999
"isort==5.7.0",
100-
"black==20.8b1",
100+
"black==21.6b0",
101101
"flake8-comprehensions",
102102
"flake8-bugbear==21.3.2",
103103
"flake8",

synapse/handlers/federation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,7 @@ async def on_make_leave_request(
19611961
return event
19621962

19631963
async def on_send_leave_request(self, origin: str, pdu: EventBase) -> None:
1964-
""" We have received a leave event for a room. Fully process it."""
1964+
"""We have received a leave event for a room. Fully process it."""
19651965
event = pdu
19661966

19671967
logger.debug(

synapse/http/servlet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ class attribute containing a pre-compiled regular expression. The automatic
454454
"""
455455

456456
def register(self, http_server):
457-
""" Register this servlet with the given HTTP server. """
457+
"""Register this servlet with the given HTTP server."""
458458
patterns = getattr(self, "PATTERNS", None)
459459
if patterns:
460460
for method in ("GET", "PUT", "POST", "DELETE"):

synapse/replication/tcp/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ async def _process_position(
571571
def on_REMOTE_SERVER_UP(
572572
self, conn: IReplicationConnection, cmd: RemoteServerUpCommand
573573
):
574-
""""Called when get a new REMOTE_SERVER_UP command."""
574+
"""Called when get a new REMOTE_SERVER_UP command."""
575575
self._replication_data_handler.on_remote_server_up(cmd.data)
576576

577577
self._notifier.notify_remote_server_up(cmd.data)

synapse/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,14 @@ class RoomAlias(DomainSpecificString):
284284

285285
@attr.s(slots=True, frozen=True, repr=False)
286286
class RoomID(DomainSpecificString):
287-
"""Structure representing a room id. """
287+
"""Structure representing a room id."""
288288

289289
SIGIL = "!"
290290

291291

292292
@attr.s(slots=True, frozen=True, repr=False)
293293
class EventID(DomainSpecificString):
294-
"""Structure representing an event id. """
294+
"""Structure representing an event id."""
295295

296296
SIGIL = "$"
297297

tests/handlers/test_appservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
class AppServiceHandlerTestCase(unittest.TestCase):
29-
""" Tests the ApplicationServicesHandler. """
29+
"""Tests the ApplicationServicesHandler."""
3030

3131
def setUp(self):
3232
self.mock_store = Mock()

tests/handlers/test_directory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929
class DirectoryTestCase(unittest.HomeserverTestCase):
30-
""" Tests the directory service. """
30+
"""Tests the directory service."""
3131

3232
def make_homeserver(self, reactor, clock):
3333
self.mock_federation = Mock()

tests/handlers/test_profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
class ProfileTestCase(unittest.HomeserverTestCase):
26-
""" Tests profile management. """
26+
"""Tests profile management."""
2727

2828
def make_homeserver(self, reactor, clock):
2929
self.mock_federation = Mock()

0 commit comments

Comments
 (0)