diff --git a/build.cmd b/build.cmd index b78904b5..8669ceff 100644 --- a/build.cmd +++ b/build.cmd @@ -195,8 +195,12 @@ echo "#################################" :: Setting native code build environment echo Setting native build environment ... set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +set vswhereOutputFile=vswhereOutput.tmp + if exist %_VSWHERE% ( - for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools + %_VSWHERE% -version "[15.0,16.0)" -latest -prerelease -property installationPath > %vswhereOutputFile% + for /f "tokens=* delims=" %%i in (%vswhereOutputFile%) do set _VSCOMNTOOLS=%%i\Common7\Tools + del %vswhereOutputFile% ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" goto :MissingVersion diff --git a/src/python/tools/code_fixer.py b/src/python/tools/code_fixer.py index 6d927138..8be5a7c1 100644 --- a/src/python/tools/code_fixer.py +++ b/src/python/tools/code_fixer.py @@ -310,5 +310,6 @@ def run_autoflake(filename): args.expand_star_imports = None args.remove_duplicate_keys = None args.remove_unused_variables = None - args.ignore_init_module_imports = False + args.ignore_init_module_imports = None + args.check = None autoflake.fix_file(filename, args=args, standard_out=sys.stdout)