From 24a01864fdeea9737144facade9932d9817732bd Mon Sep 17 00:00:00 2001 From: Boris Staletic Date: Fri, 23 Nov 2018 11:39:35 +0100 Subject: [PATCH] Run flake8 on scripts in root --- ci/appveyor/appveyor_install.bat | 1 + install.py | 3 ++- run_tests.py | 12 +++++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ci/appveyor/appveyor_install.bat b/ci/appveyor/appveyor_install.bat index 33c78072..50f942aa 100755 --- a/ci/appveyor/appveyor_install.bat +++ b/ci/appveyor/appveyor_install.bat @@ -18,5 +18,6 @@ python --version appveyor DownloadFile https://bootstrap.pypa.io/get-pip.py python get-pip.py +del get-pip.py pip install -r python\test_requirements.txt if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/install.py b/install.py index 0783219f..96d3bda3 100755 --- a/install.py +++ b/install.py @@ -43,9 +43,10 @@ def Main(): old_libs = ( glob.glob( p.join( DIR_OF_OLD_LIBS, '*ycm_core.*' ) ) + glob.glob( p.join( DIR_OF_OLD_LIBS, '*ycm_client_support.*' ) ) + - glob.glob( p.join( DIR_OF_OLD_LIBS, '*clang*.*') ) ) + glob.glob( p.join( DIR_OF_OLD_LIBS, '*clang*.*' ) ) ) for lib in old_libs: os.remove( lib ) + if __name__ == "__main__": Main() diff --git a/run_tests.py b/run_tests.py index 618b6302..68b37e27 100755 --- a/run_tests.py +++ b/run_tests.py @@ -3,6 +3,7 @@ import os import subprocess import os.path as p +import glob import sys DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) ) @@ -37,9 +38,13 @@ import argparse def RunFlake8(): print( 'Running flake8' ) - subprocess.check_call( [ - sys.executable, '-m', 'flake8', p.join( DIR_OF_THIS_SCRIPT, 'python' ) - ] ) + args = [ sys.executable, + '-m', + 'flake8', + p.join( DIR_OF_THIS_SCRIPT, 'python' ) ] + root_dir_scripts = glob.glob( p.join( DIR_OF_THIS_SCRIPT, '*.py' ) ) + args.extend( root_dir_scripts ) + subprocess.check_call( args ) def ParseArguments(): @@ -93,5 +98,6 @@ def Main(): BuildYcmdLibs( parsed_args ) NoseTests( parsed_args, nosetests_args ) + if __name__ == "__main__": Main()