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

Commit

Permalink
Bump black configuration to target py36
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Callahan <[email protected]>
  • Loading branch information
callahad committed Apr 9, 2021
1 parent 0b31121 commit 653cbf1
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions changelog.d/9781.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update Black configuration to target Python 3.6.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
showcontent = true

[tool.black]
target-version = ['py35']
target-version = ['py36']
exclude = '''
(
Expand Down
2 changes: 1 addition & 1 deletion synapse/config/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def generate_config_section(
tls_certificate_path,
tls_private_key_path,
acme_domain,
**kwargs
**kwargs,
):
"""If the acme_domain is specified acme will be enabled.
If the TLS paths are not specified the default will be certs in the
Expand Down
2 changes: 1 addition & 1 deletion synapse/handlers/presence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ async def get_new_events(
room_ids=None,
include_offline=True,
explicit_room_id=None,
**kwargs
**kwargs,
) -> Tuple[List[UserPresenceState], int]:
# The process for getting presence events are:
# 1. Get the rooms the user is in.
Expand Down
2 changes: 1 addition & 1 deletion synapse/http/matrixfederationclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ async def _send_request_with_optional_trailing_slash(
self,
request: MatrixFederationRequest,
try_trailing_slash_on_400: bool = False,
**send_request_args
**send_request_args,
) -> IResponse:
"""Wrapper for _send_request which can optionally retry the request
upon receiving a combination of a 400 HTTP response code and a
Expand Down
2 changes: 1 addition & 1 deletion synapse/http/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def __init__(
resource,
server_version_string,
*args,
**kwargs
**kwargs,
):
Site.__init__(self, resource, *args, **kwargs)

Expand Down
8 changes: 4 additions & 4 deletions synapse/storage/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def new_transaction(
exception_callbacks: List[_CallbackListEntry],
func: "Callable[..., R]",
*args: Any,
**kwargs: Any
**kwargs: Any,
) -> R:
"""Start a new database transaction with the given connection.
Expand Down Expand Up @@ -622,7 +622,7 @@ async def runInteraction(
func: "Callable[..., R]",
*args: Any,
db_autocommit: bool = False,
**kwargs: Any
**kwargs: Any,
) -> R:
"""Starts a transaction on the database and runs a given function
Expand Down Expand Up @@ -682,7 +682,7 @@ async def runWithConnection(
func: "Callable[..., R]",
*args: Any,
db_autocommit: bool = False,
**kwargs: Any
**kwargs: Any,
) -> R:
"""Wraps the .runWithConnection() method on the underlying db_pool.
Expand Down Expand Up @@ -775,7 +775,7 @@ async def execute(
desc: str,
decoder: Optional[Callable[[Cursor], R]],
query: str,
*args: Any
*args: Any,
) -> R:
"""Runs a single query for a result set.
Expand Down
2 changes: 1 addition & 1 deletion tests/replication/slave/storage/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def build_event(
prev_state: Optional[list] = None,
redacts=None,
push_actions: Iterable = frozenset(),
**content
**content,
):
prev_events = prev_events or []
auth_events = auth_events or []
Expand Down
2 changes: 1 addition & 1 deletion tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_event(
depth=2,
event_id=None,
prev_events: Optional[List[str]] = None,
**kwargs
**kwargs,
):
global _next_event_id

Expand Down
6 changes: 3 additions & 3 deletions tests/test_utils/event_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def inject_member_event(
membership: str,
target: Optional[str] = None,
extra_content: Optional[dict] = None,
**kwargs
**kwargs,
) -> EventBase:
"""Inject a membership event into a room."""
if target is None:
Expand All @@ -58,7 +58,7 @@ async def inject_event(
hs: synapse.server.HomeServer,
room_version: Optional[str] = None,
prev_event_ids: Optional[List[str]] = None,
**kwargs
**kwargs,
) -> EventBase:
"""Inject a generic event into a room
Expand All @@ -83,7 +83,7 @@ async def create_event(
hs: synapse.server.HomeServer,
room_version: Optional[str] = None,
prev_event_ids: Optional[List[str]] = None,
**kwargs
**kwargs,
) -> Tuple[EventBase, EventContext]:
if room_version is None:
room_version = await hs.get_datastore().get_room_version_id(kwargs["room_id"])
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def setup_test_homeserver(
config=None,
reactor=None,
homeserver_to_use: Type[HomeServer] = TestHomeServer,
**kwargs
**kwargs,
):
"""
Setup a homeserver suitable for running tests against. Keyword arguments
Expand Down

0 comments on commit 653cbf1

Please sign in to comment.