summary refs log tree commit diff
path: root/synapse/event_auth.py
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2021-11-25 16:14:23 +0000
committerGitHub <noreply@github.com>2021-11-25 16:14:23 +0000
commit7862f821de30b17ed035a3355e552d027429dc6b (patch)
tree330dfa6675379825f0663ec3aca636f9465b1833 /synapse/event_auth.py
parentImprove performance of `remove_{hidden,deleted}_devices_from_device_inbox` (#... (diff)
downloadsynapse-7862f821de30b17ed035a3355e552d027429dc6b.tar.xz
Annotate string constants in `synapse.api.constants` with `Final` (#11356)
This change makes mypy complain if the constants are ever reassigned,
and, more usefully, makes mypy type them as `Literal`s instead of `str`s,
allowing code of the following form to pass mypy:
```py
def do_something(membership: Literal["join", "leave"], ...): ...

do_something(Membership.JOIN, ...)
```
Diffstat (limited to 'synapse/event_auth.py')
0 files changed, 0 insertions, 0 deletions