File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,16 @@ def customize_compiler(compiler: CCompiler) -> None:
324
324
'AR' ,
325
325
'ARFLAGS' ,
326
326
)
327
+ assert isinstance (cc , str )
328
+ assert isinstance (cxx , str )
329
+ assert isinstance (cflags , str )
330
+ assert isinstance (ccshared , str )
331
+ assert isinstance (ldshared , str )
332
+ assert isinstance (ldcxxshared , str )
333
+ assert isinstance (shlib_suffix , str )
334
+ assert isinstance (ar_flags , str )
335
+ ar = os .environ .get ('AR' , ar )
336
+ assert isinstance (ar , str )
327
337
328
338
cxxflags = cflags
329
339
@@ -354,8 +364,6 @@ def customize_compiler(compiler: CCompiler) -> None:
354
364
ldshared = _add_flags (ldshared , 'CPP' )
355
365
ldcxxshared = _add_flags (ldcxxshared , 'CPP' )
356
366
357
- ar = os .environ .get ('AR' , ar )
358
-
359
367
archiver = ar + ' ' + os .environ .get ('ARFLAGS' , ar_flags )
360
368
cc_cmd = cc + ' ' + cflags
361
369
cxx_cmd = cxx + ' ' + cxxflags
Original file line number Diff line number Diff line change @@ -151,7 +151,9 @@ def change_root(
151
151
if not os .path .isabs (pathname ):
152
152
return os .path .join (new_root , pathname )
153
153
else :
154
- return os .path .join (new_root , pathname [1 :])
154
+ # type-ignore: This makes absolutes os.Pathlike unsupported in this branch.
155
+ # Either this or we don't support bytes-based paths, or we complexify this branch.
156
+ return os .path .join (new_root , pathname [1 :]) # type: ignore[index]
155
157
156
158
elif os .name == 'nt' :
157
159
(drive , path ) = os .path .splitdrive (pathname )
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ disable_error_code =
27
27
arg-type,
28
28
assignment,
29
29
call-overload,
30
- index,
31
30
func-returns-value,
32
31
union-attr,
33
32
str-bytes-safe,
You can’t perform that action at this time.
0 commit comments