This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 4 files changed +7
-4
lines changed
4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change
1
+ Add some type hints to tests files.
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def setUp(self):
39
39
# NB: `signedjson` expects `nacl.signing.SigningKey` instances which have been
40
40
# monkeypatched to include new `alg` and `version` attributes. This is captured
41
41
# by the `signedjson.types.SigningKey` protocol.
42
- self .signing_key : signedjson .types .SigningKey = nacl .signing .SigningKey (
42
+ self .signing_key : signedjson .types .SigningKey = nacl .signing .SigningKey ( # type: ignore[assignment]
43
43
SIGNING_KEY_SEED
44
44
)
45
45
self .signing_key .alg = KEY_ALG
Original file line number Diff line number Diff line change @@ -60,7 +60,9 @@ def test_parse_json_value(self):
60
60
with self .assertRaises (SynapseError ):
61
61
parse_json_value_from_request (make_request (b"" ))
62
62
63
- result3 = parse_json_value_from_request (make_request (b"" ), allow_empty_body = True )
63
+ result3 = parse_json_value_from_request (
64
+ make_request (b"" ), allow_empty_body = True
65
+ )
64
66
self .assertIsNone (result3 )
65
67
66
68
# Invalid UTF-8.
Original file line number Diff line number Diff line change 34
34
try :
35
35
import jaeger_client
36
36
except ImportError :
37
- jaeger_client = None
37
+ jaeger_client = None # type: ignore
38
38
39
39
from tests .unittest import TestCase
40
40
@@ -43,7 +43,7 @@ class LogContextScopeManagerTestCase(TestCase):
43
43
if LogContextScopeManager is None :
44
44
skip = "Requires opentracing" # type: ignore[unreachable]
45
45
if jaeger_client is None :
46
- skip = "Requires jaeger_client"
46
+ skip = "Requires jaeger_client" # type: ignore[unreachable]
47
47
48
48
def setUp (self ) -> None :
49
49
# since this is a unit test, we don't really want to mess around with the
You can’t perform that action at this time.
0 commit comments