@@ -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
@@ -376,7 +384,7 @@ def customize_compiler(compiler: CCompiler) -> None:
376384 if 'RANLIB' in os .environ and compiler .executables .get ('ranlib' , None ):
377385 compiler .set_executables (ranlib = os .environ ['RANLIB' ])
378386
379- compiler .shared_lib_extension = shlib_suffix
387+ compiler .shared_lib_extension = shlib_suffix # type: ignore[misc] # Assigning to ClassVar
380388
381389
382390def get_config_h_filename () -> str :
@@ -549,8 +557,8 @@ def expand_makefile_vars(s, vars):
549557@overload
550558def get_config_vars () -> dict [str , str | int ]: ...
551559@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 ]:
554562 """With no arguments, return a dictionary of all configuration
555563 variables relevant for the current platform. Generally this includes
556564 everything needed to build extensions and install both pure modules and
0 commit comments