File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,6 @@ def dispatch(argv: List[str]) -> Any:
118
118
119
119
configure_output ()
120
120
121
- main = registered_commands [args .command ].load () # type: ignore[no-untyped-call] # python/importlib_metadata#288 # noqa: E501
121
+ main = registered_commands [args .command ].load ()
122
122
123
123
return main (args .args )
Original file line number Diff line number Diff line change 16
16
import re
17
17
import zipfile
18
18
from typing import List , Optional
19
+ from typing import cast as type_cast
19
20
20
21
from pkginfo import distribution
21
22
@@ -87,5 +88,7 @@ def parse(self, data: bytes) -> None:
87
88
super ().parse (data )
88
89
89
90
fp = io .StringIO (data .decode ("utf-8" , errors = "replace" ))
91
+ # msg is ``email.message.Message`` which is a legacy API documented
92
+ # here: https://docs.python.org/3/library/email.compat32-message.html
90
93
msg = distribution .parse (fp )
91
- self .description = msg .get_payload ()
94
+ self .description = type_cast ( str , msg .get_payload () )
You can’t perform that action at this time.
0 commit comments