File tree 1 file changed +7
-3
lines changed
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":
252
252
@classmethod
253
253
def from_mypy (
254
254
cls ,
255
- items : List [MypyFileItem ],
255
+ paths : List [Path ],
256
256
* ,
257
257
opts : Optional [List [str ]] = None ,
258
258
) -> "MypyResults" :
@@ -263,7 +263,7 @@ def from_mypy(
263
263
if opts is None : # pragma: no cover
264
264
opts = mypy_argv [:]
265
265
abspath_errors = {
266
- os . path . abspath ( str (item . fspath )): [] for item in items
266
+ str (path . absolute ( )): [] for path in paths
267
267
} # type: MypyResults._abspath_errors_type
268
268
269
269
stdout , stderr , status = mypy .api .run (
@@ -304,7 +304,11 @@ def from_session(cls, session) -> "MypyResults":
304
304
results = cls .load (results_f )
305
305
except FileNotFoundError :
306
306
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
+ ],
308
312
)
309
313
with open (results_path , mode = "w" ) as results_f :
310
314
results .dump (results_f )
You can’t perform that action at this time.
0 commit comments