Run flake8 on scripts in root

This commit is contained in:
Boris Staletic 2018-11-23 11:39:35 +01:00
parent 8e33c3c644
commit 24a01864fd
3 changed files with 12 additions and 4 deletions

View File

@ -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%

View File

@ -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()

View File

@ -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()