File tree 4 files changed +9
-10
lines changed
4 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,11 @@ source = [
13
13
]
14
14
15
15
[tool .coverage .report ]
16
- exclude_also = [
17
- " assert False" ,
18
- ]
16
+ exclude_also = [" assert False" ]
19
17
show_missing = true
20
18
21
19
[tool .mypy ]
22
20
warn_unused_configs = true
23
- follow_imports = " skip"
24
21
strict = true
25
22
26
23
[[tool .mypy .overrides ]]
Original file line number Diff line number Diff line change @@ -264,10 +264,10 @@ def to_cryptography_key(self) -> _Key:
264
264
265
265
if self ._only_public :
266
266
der = dump_publickey (FILETYPE_ASN1 , self )
267
- return load_der_public_key (der )
267
+ return typing . cast ( _Key , load_der_public_key (der ) )
268
268
else :
269
269
der = dump_privatekey (FILETYPE_ASN1 , self )
270
- return load_der_private_key (der , None )
270
+ return typing . cast ( _Key , load_der_private_key (der , password = None ) )
271
271
272
272
@classmethod
273
273
def from_cryptography_key (cls , crypto_key : _Key ) -> PKey :
Original file line number Diff line number Diff line change 7
7
import pytest
8
8
9
9
10
- def pytest_report_header (config ) :
10
+ def pytest_report_header (config : pytest . Config ) -> str :
11
11
import cryptography
12
12
13
13
import OpenSSL .SSL
14
14
15
15
return (
16
- f"OpenSSL: { OpenSSL .SSL .SSLeay_version (OpenSSL .SSL .SSLEAY_VERSION )} \n "
16
+ f"OpenSSL: "
17
+ f"{ OpenSSL .SSL .SSLeay_version (OpenSSL .SSL .SSLEAY_VERSION )!r} \n "
17
18
f"cryptography: { cryptography .__version__ } "
18
19
)
19
20
Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ commands =
42
42
ruff format --check .
43
43
44
44
[testenv:py311-mypy]
45
+ extras =
46
+ test
45
47
deps =
46
48
mypy
47
- skip_install = true
48
49
commands =
49
- mypy src
50
+ mypy src/ tests/conftest.py
50
51
51
52
[testenv:check-manifest]
52
53
deps =
You can’t perform that action at this time.
0 commit comments