diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-02-21 07:15:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 07:15:07 -0500 |
commit | 509e381afa8c656e72f5fef3d651a9819794174a (patch) | |
tree | c86c50690fe104285cb2876c3cf953fb4c39e00b /synapse/rest/media/v1/_base.py | |
parent | Merge pull request #6967 from matrix-org/rav/increase_max_events_behind (diff) | |
download | synapse-509e381afa8c656e72f5fef3d651a9819794174a.tar.xz |
Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)
Ensure good comprehension hygiene using flake8-comprehensions.
Diffstat (limited to 'synapse/rest/media/v1/_base.py')
-rw-r--r-- | synapse/rest/media/v1/_base.py | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/synapse/rest/media/v1/_base.py b/synapse/rest/media/v1/_base.py index 65bbf00073..ba28dd089d 100644 --- a/synapse/rest/media/v1/_base.py +++ b/synapse/rest/media/v1/_base.py @@ -135,27 +135,25 @@ def add_file_headers(request, media_type, file_size, upload_name): # separators as defined in RFC2616. SP and HT are handled separately. # see _can_encode_filename_as_token. -_FILENAME_SEPARATOR_CHARS = set( - ( - "(", - ")", - "<", - ">", - "@", - ",", - ";", - ":", - "\\", - '"', - "/", - "[", - "]", - "?", - "=", - "{", - "}", - ) -) +_FILENAME_SEPARATOR_CHARS = { + "(", + ")", + "<", + ">", + "@", + ",", + ";", + ":", + "\\", + '"', + "/", + "[", + "]", + "?", + "=", + "{", + "}", +} def _can_encode_filename_as_token(x): |