bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)

I suppose it is a remnants of very old code written when str, int, list, dict, etc
were functions and not classes.
This commit is contained in:
Serhiy Storchaka 2022-05-08 17:10:11 +03:00 committed by GitHub
parent c826867b7c
commit 3680ebed7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 41 additions and 39 deletions

View file

@ -1351,7 +1351,7 @@ def buildPython():
build_time_vars = l_dict['build_time_vars']
vars = {}
for k, v in build_time_vars.items():
if type(v) == type(''):
if isinstance(v, str):
for p in (include_path, lib_path):
v = v.replace(' ' + p, '')
v = v.replace(p + ' ', '')