summary refs log tree commit diff
path: root/synapse/config/oembed.py
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2023-05-18 11:11:30 +0100
committerGitHub <noreply@github.com>2023-05-18 11:11:30 +0100
commit68dcd2cbcb3c01787ade9cf3725486712a7cafda (patch)
tree9e3518e715f3c85b81b17110895c7e5b97552ff6 /synapse/config/oembed.py
parentFix error message when `app_service_config_files` validation fails (#15614) (diff)
downloadsynapse-68dcd2cbcb3c01787ade9cf3725486712a7cafda.tar.xz
Re-type config paths in `ConfigError`s to be `StrSequence`s (#15615)
Part of #14809.

Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'synapse/config/oembed.py')
-rw-r--r--synapse/config/oembed.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/config/oembed.py b/synapse/config/oembed.py
index 0d32aba70a..d7959639ee 100644
--- a/synapse/config/oembed.py
+++ b/synapse/config/oembed.py
@@ -19,7 +19,7 @@ from urllib import parse as urlparse
 import attr
 import pkg_resources
 
-from synapse.types import JsonDict
+from synapse.types import JsonDict, StrSequence
 
 from ._base import Config, ConfigError
 from ._util import validate_config
@@ -80,7 +80,7 @@ class OembedConfig(Config):
             )
 
     def _parse_and_validate_provider(
-        self, providers: List[JsonDict], config_path: Iterable[str]
+        self, providers: List[JsonDict], config_path: StrSequence
     ) -> Iterable[OEmbedEndpointConfig]:
         # Ensure it is the proper form.
         validate_config(
@@ -112,7 +112,7 @@ class OembedConfig(Config):
                     api_endpoint, patterns, endpoint.get("formats")
                 )
 
-    def _glob_to_pattern(self, glob: str, config_path: Iterable[str]) -> Pattern:
+    def _glob_to_pattern(self, glob: str, config_path: StrSequence) -> Pattern:
         """
         Convert the glob into a sane regular expression to match against. The
         rules followed will be slightly different for the domain portion vs.