mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Tell Black to format code for Python 3.5 (#8664)
This allows trailing commas in multi-line arg lists. Minor, but we might as well keep our formatting current with regard to our minimum supported Python version. Signed-off-by: Dan Callahan <danc@element.io>
This commit is contained in:
parent
e90fad5cba
commit
aff1eb7c67
1
changelog.d/8664.misc
Normal file
1
changelog.d/8664.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Tell Black to format code for Python 3.5.
|
@ -35,7 +35,7 @@
|
|||||||
showcontent = true
|
showcontent = true
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
target-version = ['py34']
|
target-version = ['py35']
|
||||||
exclude = '''
|
exclude = '''
|
||||||
|
|
||||||
(
|
(
|
||||||
|
@ -359,7 +359,7 @@ class SimpleHttpClient:
|
|||||||
agent=self.agent,
|
agent=self.agent,
|
||||||
data=body_producer,
|
data=body_producer,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
**self._extra_treq_args
|
**self._extra_treq_args,
|
||||||
) # type: defer.Deferred
|
) # type: defer.Deferred
|
||||||
|
|
||||||
# we use our own timeout mechanism rather than treq's as a workaround
|
# we use our own timeout mechanism rather than treq's as a workaround
|
||||||
|
@ -94,7 +94,7 @@ def make_pool(
|
|||||||
cp_openfun=lambda conn: engine.on_new_connection(
|
cp_openfun=lambda conn: engine.on_new_connection(
|
||||||
LoggingDatabaseConnection(conn, engine, "on_new_connection")
|
LoggingDatabaseConnection(conn, engine, "on_new_connection")
|
||||||
),
|
),
|
||||||
**db_config.config.get("args", {})
|
**db_config.config.get("args", {}),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -632,7 +632,7 @@ class DatabasePool:
|
|||||||
func,
|
func,
|
||||||
*args,
|
*args,
|
||||||
db_autocommit=db_autocommit,
|
db_autocommit=db_autocommit,
|
||||||
**kwargs
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
for after_callback, after_args, after_kwargs in after_callbacks:
|
for after_callback, after_args, after_kwargs in after_callbacks:
|
||||||
|
@ -110,7 +110,7 @@ async def get_retry_limiter(destination, clock, store, ignore_backoff=False, **k
|
|||||||
failure_ts,
|
failure_ts,
|
||||||
retry_interval,
|
retry_interval,
|
||||||
backoff_on_failure=backoff_on_failure,
|
backoff_on_failure=backoff_on_failure,
|
||||||
**kwargs
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ class BaseMultiWorkerStreamTestCase(unittest.HomeserverTestCase):
|
|||||||
homeserver_to_use=GenericWorkerServer,
|
homeserver_to_use=GenericWorkerServer,
|
||||||
config=config,
|
config=config,
|
||||||
reactor=self.reactor,
|
reactor=self.reactor,
|
||||||
**kwargs
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
# If the instance is in the `instance_map` config then workers may try
|
# If the instance is in the `instance_map` config then workers may try
|
||||||
|
@ -449,7 +449,7 @@ class EventsStreamTestCase(BaseStreamTestCase):
|
|||||||
sender=sender,
|
sender=sender,
|
||||||
type="test_event",
|
type="test_event",
|
||||||
content={"body": body},
|
content={"body": body},
|
||||||
**kwargs
|
**kwargs,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ def setup_test_homeserver(cleanup_func, *args, **kwargs):
|
|||||||
pool._runWithConnection,
|
pool._runWithConnection,
|
||||||
func,
|
func,
|
||||||
*args,
|
*args,
|
||||||
**kwargs
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
def runInteraction(interaction, *args, **kwargs):
|
def runInteraction(interaction, *args, **kwargs):
|
||||||
@ -390,7 +390,7 @@ def setup_test_homeserver(cleanup_func, *args, **kwargs):
|
|||||||
pool._runInteraction,
|
pool._runInteraction,
|
||||||
interaction,
|
interaction,
|
||||||
*args,
|
*args,
|
||||||
**kwargs
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
pool.runWithConnection = runWithConnection
|
pool.runWithConnection = runWithConnection
|
||||||
|
@ -412,7 +412,7 @@ class ClientIpAuthTestCase(unittest.HomeserverTestCase):
|
|||||||
"GET",
|
"GET",
|
||||||
"/_matrix/client/r0/admin/users/" + self.user_id,
|
"/_matrix/client/r0/admin/users/" + self.user_id,
|
||||||
access_token=access_token,
|
access_token=access_token,
|
||||||
**make_request_args
|
**make_request_args,
|
||||||
)
|
)
|
||||||
request.requestHeaders.addRawHeader(b"User-Agent", b"Mozzila pizza")
|
request.requestHeaders.addRawHeader(b"User-Agent", b"Mozzila pizza")
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ async def inject_member_event(
|
|||||||
sender=sender,
|
sender=sender,
|
||||||
state_key=target,
|
state_key=target,
|
||||||
content=content,
|
content=content,
|
||||||
**kwargs
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user