chore: cleanup pylint violations (#26252)

* chore: cleanup pylint violations

* chore: cleanup pylint violatins
This commit is contained in:
David Sanders 2020-11-01 22:43:21 -08:00 committed by GitHub
parent 4c40ce09fd
commit 2a392c11f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 55 additions and 21 deletions

View file

@ -19,10 +19,10 @@ from get_toolchain_if_necessary import CalculateHash
@contextlib.contextmanager
def cwd(dir):
def cwd(directory):
curdir = os.getcwd()
try:
os.chdir(dir)
os.chdir(directory)
yield
finally:
os.chdir(curdir)
@ -70,12 +70,18 @@ def windows_profile():
win_sdk_dir = SetEnvironmentAndGetSDKDir()
path = NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH'])
# since current windows executable are symbols path dependant,
# profile the current directory too
return {
'pwd': os.getcwd(), # since current windows executable are symbols path dependant, profile the current directory too
'pwd': os.getcwd(),
'installed_software': windows_installed_software(),
'sdks': [
{'name': 'vs', 'path': path, 'hash': calculate_hash(path)},
{'name': 'wsdk', 'path': win_sdk_dir, 'hash': calculate_hash(win_sdk_dir)}
{
'name': 'wsdk',
'path': win_sdk_dir,
'hash': calculate_hash(win_sdk_dir),
},
],
'runtime_lib_dirs': runtime_dll_dirs,
}
@ -93,5 +99,5 @@ if __name__ == '__main__':
parser = optparse.OptionParser()
parser.add_option('--output-json', metavar='FILE', default='profile.json',
help='write information about toolchain to FILE')
options, args = parser.parse_args()
sys.exit(main(options))
opts, args = parser.parse_args()
sys.exit(main(opts))