Auto merge of #3241 - bstaletic:flakes, r=Valloric

[READY] Run flake8 on scripts in root

See https://github.com/Valloric/ycmd/pull/1135 for reference.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3241)
<!-- Reviewable:end -->
This commit is contained in:
zzbot 2018-11-26 17:32:43 -08:00 committed by GitHub
commit 9e0e660bee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()