@@ -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
@@ -376,7 +384,7 @@ def customize_compiler(compiler: CCompiler) -> None:
376
384
if 'RANLIB' in os .environ and compiler .executables .get ('ranlib' , None ):
377
385
compiler .set_executables (ranlib = os .environ ['RANLIB' ])
378
386
379
- compiler .shared_lib_extension = shlib_suffix
387
+ compiler .shared_lib_extension = shlib_suffix # type: ignore[misc] # Assigning to ClassVar
380
388
381
389
382
390
def get_config_h_filename () -> str :
@@ -549,8 +557,8 @@ def expand_makefile_vars(s, vars):
549
557
@overload
550
558
def get_config_vars () -> dict [str , str | int ]: ...
551
559
@overload
552
- def get_config_vars (arg : str , / , * args : str ) -> list [str | int ]: ...
553
- def get_config_vars (* args : str ) -> list [str | int ] | dict [str , str | int ]:
560
+ def get_config_vars (arg : str , / , * args : str ) -> list [str | int | None ]: ...
561
+ def get_config_vars (* args : str ) -> list [str | int | None ] | dict [str , str | int ]:
554
562
"""With no arguments, return a dictionary of all configuration
555
563
variables relevant for the current platform. Generally this includes
556
564
everything needed to build extensions and install both pure modules and
0 commit comments