forked-synapse/synapse/http
David Robertson 1bfd141205
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>
2021-10-28 14:14:42 +01:00
..
federation Additional type hints for the proxy agent and SRV resolver modules. (#10608) 2021-08-18 13:53:20 -04:00
__init__.py Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
additional_resource.py Additional type hints for the proxy agent and SRV resolver modules. (#10608) 2021-08-18 13:53:20 -04:00
client.py Relax ignore-missing-imports for modules that have stubs now and update mypy (#11006) 2021-10-08 14:49:41 +01:00
connectproxyclient.py Type hints for the remaining two files in synapse.http. (#11164) 2021-10-28 14:14:42 +01:00
matrixfederationclient.py Add type hints for most HomeServer parameters (#11095) 2021-10-22 18:15:41 +01:00
proxyagent.py Additional type hints for the proxy agent and SRV resolver modules. (#10608) 2021-08-18 13:53:20 -04:00
request_metrics.py Type hints for the remaining two files in synapse.http. (#11164) 2021-10-28 14:14:42 +01:00
server.py Add type hints for most HomeServer parameters (#11095) 2021-10-22 18:15:41 +01:00
servlet.py Additional type hints for client REST servlets (part 5) (#10736) 2021-09-03 09:22:22 -04:00
site.py Add reactor to SynapseRequest and fix up types. (#10868) 2021-09-24 11:01:25 +01:00