mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:44:49 -04:00
Use inline type hints in http/federation/
, storage/
and util/
(#10381)
This commit is contained in:
parent
3acf85c85f
commit
bdfde6dca1
38 changed files with 149 additions and 161 deletions
|
@ -39,7 +39,7 @@ def get_value_from_macaroon(macaroon: pymacaroons.Macaroon, key: str) -> str:
|
|||
caveat in the macaroon, or if the caveat was not found in the macaroon.
|
||||
"""
|
||||
prefix = key + " = "
|
||||
result = None # type: Optional[str]
|
||||
result: Optional[str] = None
|
||||
for caveat in macaroon.caveats:
|
||||
if not caveat.caveat_id.startswith(prefix):
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue