File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ def serialized(self) -> str:
5757terminal_summary_title = "mypy"
5858
5959
60+ def default_test_name_formatter (* , item : MypyFileItem ) -> str :
61+ path = item .path .relative_to (item .config .invocation_params .dir )
62+ return f"[{ terminal_summary_title } ] { path } "
63+
64+
65+ test_name_formatter = default_test_name_formatter
66+
67+
6068def default_file_error_formatter (
6169 item : MypyItem ,
6270 results : MypyResults ,
@@ -268,13 +276,9 @@ def runtest(self) -> None:
268276 )
269277 )
270278
271- def reportinfo (self ) -> Tuple [str , None , str ]:
279+ def reportinfo (self ) -> Tuple [Path , None , str ]:
272280 """Produce a heading for the test report."""
273- return (
274- str (self .path ),
275- None ,
276- str (self .path .relative_to (self .config .invocation_params .dir )),
277- )
281+ return (self .path , None , test_name_formatter (item = self ))
278282
279283
280284class MypyStatusItem (MypyItem ):
You can’t perform that action at this time.
0 commit comments