diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-10-02 05:29:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 05:29:01 -0700 |
commit | 864f14454322c6cba11476667ade8fc6cbea6f44 (patch) | |
tree | c50252079f4cdf0ac2fc9c1193176590ed64e6ab /synapse/logging/opentracing.py | |
parent | Fix yields and copy instead of move push rules on room upgrade (#6144) (diff) | |
download | synapse-864f14454322c6cba11476667ade8fc6cbea6f44.tar.xz |
Fix up some typechecking (#6150)
* type checking fixes * changelog
Diffstat (limited to 'synapse/logging/opentracing.py')
-rw-r--r-- | synapse/logging/opentracing.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py index 308a27213b..cd1ff6a518 100644 --- a/synapse/logging/opentracing.py +++ b/synapse/logging/opentracing.py @@ -170,6 +170,7 @@ import inspect import logging import re from functools import wraps +from typing import Dict from canonicaljson import json @@ -547,7 +548,7 @@ def inject_active_span_twisted_headers(headers, destination, check_destination=T return span = opentracing.tracer.active_span - carrier = {} + carrier = {} # type: Dict[str, str] opentracing.tracer.inject(span, opentracing.Format.HTTP_HEADERS, carrier) for key, value in carrier.items(): @@ -584,7 +585,7 @@ def inject_active_span_byte_dict(headers, destination, check_destination=True): span = opentracing.tracer.active_span - carrier = {} + carrier = {} # type: Dict[str, str] opentracing.tracer.inject(span, opentracing.Format.HTTP_HEADERS, carrier) for key, value in carrier.items(): @@ -639,7 +640,7 @@ def get_active_span_text_map(destination=None): if destination and not whitelisted_homeserver(destination): return {} - carrier = {} + carrier = {} # type: Dict[str, str] opentracing.tracer.inject( opentracing.tracer.active_span, opentracing.Format.TEXT_MAP, carrier ) @@ -653,7 +654,7 @@ def active_span_context_as_string(): Returns: The active span context encoded as a string. """ - carrier = {} + carrier = {} # type: Dict[str, str] if opentracing: opentracing.tracer.inject( opentracing.tracer.active_span, opentracing.Format.TEXT_MAP, carrier |