File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ def load(cls, results_f: TextIO) -> "MypyResults":
252252 @classmethod
253253 def from_mypy (
254254 cls ,
255- items : List [MypyFileItem ],
255+ paths : List [Path ],
256256 * ,
257257 opts : Optional [List [str ]] = None ,
258258 ) -> "MypyResults" :
@@ -263,7 +263,7 @@ def from_mypy(
263263 if opts is None : # pragma: no cover
264264 opts = mypy_argv [:]
265265 abspath_errors = {
266- os . path . abspath ( str (item . fspath )): [] for item in items
266+ str (path . absolute ( )): [] for path in paths
267267 } # type: MypyResults._abspath_errors_type
268268
269269 stdout , stderr , status = mypy .api .run (
@@ -304,7 +304,11 @@ def from_session(cls, session) -> "MypyResults":
304304 results = cls .load (results_f )
305305 except FileNotFoundError :
306306 results = cls .from_mypy (
307- [item for item in session .items if isinstance (item , MypyFileItem )],
307+ [
308+ Path (item .fspath )
309+ for item in session .items
310+ if isinstance (item , MypyFileItem )
311+ ],
308312 )
309313 with open (results_path , mode = "w" ) as results_f :
310314 results .dump (results_f )
You can’t perform that action at this time.
0 commit comments