From 0a00b7ff14890987f09112a2ae696c61001e6cf1 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 16 Feb 2021 16:32:34 -0600 Subject: Update black, and run auto formatting over the codebase (#9381) - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version --- synapse/config/server.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'synapse/config/server.py') diff --git a/synapse/config/server.py b/synapse/config/server.py index a635b8a7dc..6f3325ff81 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -52,7 +52,12 @@ def _6to4(network: IPNetwork) -> IPNetwork: hex_network = hex(network.first)[2:] hex_network = ("0" * (8 - len(hex_network))) + hex_network return IPNetwork( - "2002:%s:%s::/%d" % (hex_network[:4], hex_network[4:], 16 + network.prefixlen,) + "2002:%s:%s::/%d" + % ( + hex_network[:4], + hex_network[4:], + 16 + network.prefixlen, + ) ) @@ -254,7 +259,8 @@ class ServerConfig(Config): # Whether to require sharing a room with a user to retrieve their # profile data self.limit_profile_requests_to_users_who_share_rooms = config.get( - "limit_profile_requests_to_users_who_share_rooms", False, + "limit_profile_requests_to_users_who_share_rooms", + False, ) if "restrict_public_rooms_to_local_users" in config and ( @@ -614,7 +620,9 @@ class ServerConfig(Config): if manhole: self.listeners.append( ListenerConfig( - port=manhole, bind_addresses=["127.0.0.1"], type="manhole", + port=manhole, + bind_addresses=["127.0.0.1"], + type="manhole", ) ) @@ -650,7 +658,8 @@ class ServerConfig(Config): # and letting the client know which email address is bound to an account and # which one isn't. self.request_token_inhibit_3pid_errors = config.get( - "request_token_inhibit_3pid_errors", False, + "request_token_inhibit_3pid_errors", + False, ) # List of users trialing the new experimental default push rules. This setting is -- cgit 1.4.1