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

Commit 653cbf1

Browse files
committed
Bump black configuration to target py36
Signed-off-by: Dan Callahan <[email protected]>
1 parent 0b31121 commit 653cbf1

File tree

11 files changed

+16
-15
lines changed

11 files changed

+16
-15
lines changed

changelog.d/9781.misc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update Black configuration to target Python 3.6.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
showcontent = true
3636

3737
[tool.black]
38-
target-version = ['py35']
38+
target-version = ['py36']
3939
exclude = '''
4040
4141
(

synapse/config/tls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def generate_config_section(
270270
tls_certificate_path,
271271
tls_private_key_path,
272272
acme_domain,
273-
**kwargs
273+
**kwargs,
274274
):
275275
"""If the acme_domain is specified acme will be enabled.
276276
If the TLS paths are not specified the default will be certs in the

synapse/handlers/presence.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ async def get_new_events(
10711071
room_ids=None,
10721072
include_offline=True,
10731073
explicit_room_id=None,
1074-
**kwargs
1074+
**kwargs,
10751075
) -> Tuple[List[UserPresenceState], int]:
10761076
# The process for getting presence events are:
10771077
# 1. Get the rooms the user is in.

synapse/http/matrixfederationclient.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ async def _send_request_with_optional_trailing_slash(
272272
self,
273273
request: MatrixFederationRequest,
274274
try_trailing_slash_on_400: bool = False,
275-
**send_request_args
275+
**send_request_args,
276276
) -> IResponse:
277277
"""Wrapper for _send_request which can optionally retry the request
278278
upon receiving a combination of a 400 HTTP response code and a

synapse/http/site.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def __init__(
497497
resource,
498498
server_version_string,
499499
*args,
500-
**kwargs
500+
**kwargs,
501501
):
502502
Site.__init__(self, resource, *args, **kwargs)
503503

synapse/storage/database.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def new_transaction(
488488
exception_callbacks: List[_CallbackListEntry],
489489
func: "Callable[..., R]",
490490
*args: Any,
491-
**kwargs: Any
491+
**kwargs: Any,
492492
) -> R:
493493
"""Start a new database transaction with the given connection.
494494
@@ -622,7 +622,7 @@ async def runInteraction(
622622
func: "Callable[..., R]",
623623
*args: Any,
624624
db_autocommit: bool = False,
625-
**kwargs: Any
625+
**kwargs: Any,
626626
) -> R:
627627
"""Starts a transaction on the database and runs a given function
628628
@@ -682,7 +682,7 @@ async def runWithConnection(
682682
func: "Callable[..., R]",
683683
*args: Any,
684684
db_autocommit: bool = False,
685-
**kwargs: Any
685+
**kwargs: Any,
686686
) -> R:
687687
"""Wraps the .runWithConnection() method on the underlying db_pool.
688688
@@ -775,7 +775,7 @@ async def execute(
775775
desc: str,
776776
decoder: Optional[Callable[[Cursor], R]],
777777
query: str,
778-
*args: Any
778+
*args: Any,
779779
) -> R:
780780
"""Runs a single query for a result set.
781781

tests/replication/slave/storage/test_events.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def build_event(
340340
prev_state: Optional[list] = None,
341341
redacts=None,
342342
push_actions: Iterable = frozenset(),
343-
**content
343+
**content,
344344
):
345345
prev_events = prev_events or []
346346
auth_events = auth_events or []

tests/test_state.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def create_event(
3838
depth=2,
3939
event_id=None,
4040
prev_events: Optional[List[str]] = None,
41-
**kwargs
41+
**kwargs,
4242
):
4343
global _next_event_id
4444

tests/test_utils/event_injection.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async def inject_member_event(
3333
membership: str,
3434
target: Optional[str] = None,
3535
extra_content: Optional[dict] = None,
36-
**kwargs
36+
**kwargs,
3737
) -> EventBase:
3838
"""Inject a membership event into a room."""
3939
if target is None:
@@ -58,7 +58,7 @@ async def inject_event(
5858
hs: synapse.server.HomeServer,
5959
room_version: Optional[str] = None,
6060
prev_event_ids: Optional[List[str]] = None,
61-
**kwargs
61+
**kwargs,
6262
) -> EventBase:
6363
"""Inject a generic event into a room
6464
@@ -83,7 +83,7 @@ async def create_event(
8383
hs: synapse.server.HomeServer,
8484
room_version: Optional[str] = None,
8585
prev_event_ids: Optional[List[str]] = None,
86-
**kwargs
86+
**kwargs,
8787
) -> Tuple[EventBase, EventContext]:
8888
if room_version is None:
8989
room_version = await hs.get_datastore().get_room_version_id(kwargs["room_id"])

tests/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def setup_test_homeserver(
190190
config=None,
191191
reactor=None,
192192
homeserver_to_use: Type[HomeServer] = TestHomeServer,
193-
**kwargs
193+
**kwargs,
194194
):
195195
"""
196196
Setup a homeserver suitable for running tests against. Keyword arguments

0 commit comments

Comments
 (0)