summary refs log tree commit diff
path: root/changelog.d
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-10-28 14:14:42 +0100
committerGitHub <noreply@github.com>2021-10-28 14:14:42 +0100
commit1bfd141205d8e2abceef3c277e47f20799bbd455 (patch)
treee07028b57107bebddee990a63d44a53c4baf3f37 /changelog.d
parentdocs/openid: Add Authentik documentation. (#11151) (diff)
downloadsynapse-1bfd141205d8e2abceef3c277e47f20799bbd455.tar.xz
Type hints for the remaining two files in `synapse.http`. (#11164)
* Teach MyPy that the sentinel context is False

This means that if `ctx: LoggingContextOrSentinel`
then `bool(ctx)` narrows us to `ctx:LoggingContext`, which is a really
neat find!

* Annotate RequestMetrics

- Raise errors for sentry if we use the sentinel context
- Ensure we don't raise an error and carry on, but not recording stats
- Include stack trace in the error case to lower Sean's blood pressure

* Make mypy pass for synapse.http.request_metrics

* Make synapse.http.connectproxyclient pass mypy

Co-authored-by: reivilibre <oliverw@matrix.org>
Diffstat (limited to 'changelog.d')
-rw-r--r--changelog.d/11164.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/11164.misc b/changelog.d/11164.misc
new file mode 100644
index 0000000000..751da49183
--- /dev/null
+++ b/changelog.d/11164.misc
@@ -0,0 +1 @@
+Add type hints so that `synapse.http` passes `mypy` checks.
\ No newline at end of file