diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2021-11-25 16:14:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-25 16:14:23 +0000 |
commit | 7862f821de30b17ed035a3355e552d027429dc6b (patch) | |
tree | 330dfa6675379825f0663ec3aca636f9465b1833 /changelog.d/11313.misc | |
parent | Improve performance of `remove_{hidden,deleted}_devices_from_device_inbox` (#... (diff) | |
download | synapse-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 'changelog.d/11313.misc')
0 files changed, 0 insertions, 0 deletions