diff options
author | David Robertson <davidr@element.io> | 2022-03-29 11:41:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 10:41:19 +0000 |
commit | a2b00a44865ff11810c5302e33c1c61ce21a030e (patch) | |
tree | d16f0f5378588b3fb2c4584b00f271219255e2c1 /synapse/rest/media | |
parent | Remove unused `auth_event_ids` argument plumbing (#12304) (diff) | |
download | synapse-a2b00a44865ff11810c5302e33c1c61ce21a030e.tar.xz |
Bump `black` and `click` versions (#12320)
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/media_storage.py | 2 | ||||
-rw-r--r-- | synapse/rest/media/v1/preview_html.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/synapse/rest/media/v1/media_storage.py b/synapse/rest/media/v1/media_storage.py index 9f6c251caf..604f18bf52 100644 --- a/synapse/rest/media/v1/media_storage.py +++ b/synapse/rest/media/v1/media_storage.py @@ -352,7 +352,7 @@ class ReadableFileWrapper: `IConsumer`. """ - CHUNK_SIZE = 2 ** 14 + CHUNK_SIZE = 2**14 clock: Clock path: str diff --git a/synapse/rest/media/v1/preview_html.py b/synapse/rest/media/v1/preview_html.py index 4cc9c66fbe..ca73965fc2 100644 --- a/synapse/rest/media/v1/preview_html.py +++ b/synapse/rest/media/v1/preview_html.py @@ -23,10 +23,10 @@ if TYPE_CHECKING: logger = logging.getLogger(__name__) _charset_match = re.compile( - br'<\s*meta[^>]*charset\s*=\s*"?([a-z0-9_-]+)"?', flags=re.I + rb'<\s*meta[^>]*charset\s*=\s*"?([a-z0-9_-]+)"?', flags=re.I ) _xml_encoding_match = re.compile( - br'\s*<\s*\?\s*xml[^>]*encoding="([a-z0-9_-]+)"', flags=re.I + rb'\s*<\s*\?\s*xml[^>]*encoding="([a-z0-9_-]+)"', flags=re.I ) _content_type_match = re.compile(r'.*; *charset="?(.*?)"?(;|$)', flags=re.I) |