File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class Compiler:
7070 # dictionary (see below -- used by the 'new_compiler()' factory
7171 # function) -- authors of new compiler interface classes are
7272 # responsible for updating 'compiler_class'!
73- compiler_type : ClassVar [str ] = None # type: ignore[assignment]
73+ compiler_type : ClassVar [str ] = None
7474
7575 # XXX things not handled by this compiler abstraction model:
7676 # * client can't provide additional options for a compiler,
Original file line number Diff line number Diff line change @@ -324,6 +324,16 @@ def customize_compiler(compiler: CCompiler) -> None:
324324 'AR' ,
325325 'ARFLAGS' ,
326326 )
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 )
327337
328338 cxxflags = cflags
329339
@@ -354,8 +364,6 @@ def customize_compiler(compiler: CCompiler) -> None:
354364 ldshared = _add_flags (ldshared , 'CPP' )
355365 ldcxxshared = _add_flags (ldcxxshared , 'CPP' )
356366
357- ar = os .environ .get ('AR' , ar )
358-
359367 archiver = ar + ' ' + os .environ .get ('ARFLAGS' , ar_flags )
360368 cc_cmd = cc + ' ' + cflags
361369 cxx_cmd = cxx + ' ' + cxxflags
Original file line number Diff line number Diff line change @@ -151,7 +151,9 @@ def change_root(
151151 if not os .path .isabs (pathname ):
152152 return os .path .join (new_root , pathname )
153153 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]
155157
156158 elif os .name == 'nt' :
157159 (drive , path ) = os .path .splitdrive (pathname )
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ disable_error_code =
2727 arg-type,
2828 assignment,
2929 call-overload,
30- index,
3130 func-returns-value,
3231 union-attr,
3332 str-bytes-safe,
You can’t perform that action at this time.
0 commit comments