mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 17:19:00 -05:00
Fix additional type hints. (#9543)
Type hint fixes due to Twisted 21.2.0 adding type hints.
This commit is contained in:
parent
075c16b410
commit
7fdc6cefb3
9 changed files with 32 additions and 18 deletions
|
|
@ -322,7 +322,8 @@ def _cache_period_from_headers(
|
|||
|
||||
def _parse_cache_control(headers: Headers) -> Dict[bytes, Optional[bytes]]:
|
||||
cache_controls = {}
|
||||
for hdr in headers.getRawHeaders(b"cache-control", []):
|
||||
cache_control_headers = headers.getRawHeaders(b"cache-control") or []
|
||||
for hdr in cache_control_headers:
|
||||
for directive in hdr.split(b","):
|
||||
splits = [x.strip() for x in directive.split(b"=", 1)]
|
||||
k = splits[0].lower()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue