File tree 1 file changed +10
-6
lines changed
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:
57
57
terminal_summary_title = "mypy"
58
58
59
59
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
+
60
68
def default_file_error_formatter (
61
69
item : MypyItem ,
62
70
results : MypyResults ,
@@ -268,13 +276,9 @@ def runtest(self) -> None:
268
276
)
269
277
)
270
278
271
- def reportinfo (self ) -> Tuple [str , None , str ]:
279
+ def reportinfo (self ) -> Tuple [Path , None , str ]:
272
280
"""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 ))
278
282
279
283
280
284
class MypyStatusItem (MypyItem ):
You can’t perform that action at this time.
0 commit comments