summary refs log tree commit diff
path: root/synapse/config/_base.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2021-02-17 16:31:57 +0000
committerRichard van der Hoff <richard@matrix.org>2021-02-17 16:31:57 +0000
commit7b7831bb6363a625c97446298838c66abfeb6b8b (patch)
tree39ec72cc7b8985858012f5d77fb89796fb04ff43 /synapse/config/_base.py
parentEnsure that we never stop reconnecting to redis (#9391) (diff)
parentReorganize CONTRIBUTING.md documentation. (#9281) (diff)
downloadsynapse-7b7831bb6363a625c97446298838c66abfeb6b8b.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/config/_base.py')
-rw-r--r--synapse/config/_base.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py

index a851f8801d..97399eb9ba 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py
@@ -224,7 +224,9 @@ class Config: return self.read_templates([filename])[0] def read_templates( - self, filenames: List[str], custom_template_directory: Optional[str] = None, + self, + filenames: List[str], + custom_template_directory: Optional[str] = None, ) -> List[jinja2.Template]: """Load a list of template files from disk using the given variables. @@ -264,7 +266,10 @@ class Config: # TODO: switch to synapse.util.templates.build_jinja_env loader = jinja2.FileSystemLoader(search_directories) - env = jinja2.Environment(loader=loader, autoescape=jinja2.select_autoescape(),) + env = jinja2.Environment( + loader=loader, + autoescape=jinja2.select_autoescape(), + ) # Update the environment with our custom filters env.filters.update( @@ -825,8 +830,7 @@ class ShardedWorkerHandlingConfig: instances = attr.ib(type=List[str]) def should_handle(self, instance_name: str, key: str) -> bool: - """Whether this instance is responsible for handling the given key. - """ + """Whether this instance is responsible for handling the given key.""" # If multiple instances are not defined we always return true if not self.instances or len(self.instances) == 1: return True