summary refs log tree commit diff
path: root/changelog.d/11356.misc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 1.49.0rc1Sean Quah2021-12-071-1/+0
|
* Annotate string constants in `synapse.api.constants` with `Final` (#11356)Sean Quah2021-11-251-0/+1
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, ...) ```