mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-12 03:27:42 +00:00
Spawning from https://github.com/element-hq/synapse/pull/20143#discussion_r4080708454 `RestServlet.register` read `PATTERNS` via `getattr`, so it was typed as `Any` and mypy never checked subclasses' patterns against what `HttpServer.register_paths` expects. This declares the attribute so that classes extending `RestServlet` provide the right type for the `PATTERNS` attribute.
3 lines
68 B
Plaintext
3 lines
68 B
Plaintext
Add type annotations for `RestServlet.PATTERNS` to prevent misuse.
|
|
|