anonymousland-synapse/synapse
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
..
_scripts Fixed config parse bug in review_recent_signups (#11191) 2021-10-27 17:25:18 +01:00
api Refactor Filter to handle fields according to data being filtered. (#11194) 2021-10-27 11:26:30 -04:00
app Shut down the DNS threadpool (#11190) 2021-10-27 13:04:56 +01:00
appservice Add type hints for most HomeServer parameters (#11095) 2021-10-22 18:15:41 +01:00
config Add type hints for most HomeServer parameters (#11095) 2021-10-22 18:15:41 +01:00
crypto Add missing type hints to synapse.crypto. (#11146) 2021-10-21 13:07:07 +00:00
events Implement an on_new_event callback (#11126) 2021-10-26 15:17:36 +02:00
federation Annotate log_function decorator (#10943) 2021-10-27 17:27:23 +01:00
groups Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
handlers Annotate log_function decorator (#10943) 2021-10-27 17:27:23 +01:00
http Type hints for the remaining two files in synapse.http. (#11164) 2021-10-28 14:14:42 +01:00
logging Type hints for the remaining two files in synapse.http. (#11164) 2021-10-28 14:14:42 +01:00
metrics Type hints for the remaining two files in synapse.http. (#11164) 2021-10-28 14:14:42 +01:00
module_api Document the version each module API method was added to Synapse (#11183) 2021-10-26 11:09:10 +02:00
push disallow-untyped-defs for synapse.push (#11023) 2021-10-11 17:42:10 +01:00
replication Implement an on_new_event callback (#11126) 2021-10-26 15:17:36 +02:00
res Allow configuration of the oEmbed URLs. (#10714) 2021-08-31 18:37:07 -04:00
rest Enable changing user type via users admin API (#11174) 2021-10-26 09:01:06 +00:00
server_notices disallow-untyped-defs for synapse.server_notices (#11021) 2021-10-07 19:55:15 +01:00
spam_checker_api Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state Annotate log_function decorator (#10943) 2021-10-27 17:27:23 +01:00
static Display an error page during failure of fallback UIA. (#10561) 2021-08-18 08:13:35 -04:00
storage Annotate log_function decorator (#10943) 2021-10-27 17:27:23 +01:00
streams Remove unnecessary parentheses around tuples returned from methods (#10889) 2021-09-23 11:59:07 +01:00
util Move DNS lookups into separate thread pool (#11177) 2021-10-26 13:45:38 +01:00
__init__.py 1.46.0rc1 2021-10-26 14:04:51 +01:00
event_auth.py Check *all* auth events for room id and rejection (#11009) 2021-10-18 18:28:30 +01:00
notifier.py Implement an on_new_event callback (#11126) 2021-10-26 15:17:36 +02:00
py.typed Mark Module API error imports as re-exported and mark Synapse as containing type annotations (#11054) 2021-10-13 08:42:41 +01:00
python_dependencies.py Validate new m.room.power_levels events (#10232) 2021-08-26 17:07:58 +01:00
server.py Add type hints for most HomeServer parameters (#11095) 2021-10-22 18:15:41 +01:00
types.py Remove unnecessary parentheses around tuples returned from methods (#10889) 2021-09-23 11:59:07 +01:00
visibility.py [pyupgrade] synapse/ (#10348) 2021-07-19 15:28:05 +01:00