Exclude non-converted source code from flake8

This commit is contained in:
Troy Dai 2017-11-29 10:18:01 -08:00
Родитель 9b7005681e
Коммит 95f8ee9738
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CF7F7C8AEE4D34DC
5 изменённых файлов: 32 добавлений и 7 удалений

25
.flake8
Просмотреть файл

@ -7,4 +7,27 @@ ignore =
F401, # imported but unused, too many violations, to be removed in the future
F811, # redefinition of unused, to be removed in the future
C901 # code flow is too complex, too many violations, to be removed in the future
exclude =
azure_bdist_wheel.py
build
tools
scripts
doc
build_scripts
src/command_modules/azure-cli-storage
src/command_modules/azure-cli-keyvault
src/command_modules/azure-cli-lab
src/command_modules/azure-cli-rdbms
src/command_modules/azure-cli-lab
src/command_modules/azure-cli-sql
src/command_modules/azure-cli-vm
src/command_modules/azure-cli-acr
src/command_modules/azure-cli-acs
src/command_modules/azure-cli-batch
src/command_modules/azure-cli-cognitiveservices
src/command_modules/azure-cli-cosmosdb
src/command_modules/azure-cli-dla
src/command_modules/azure-cli-dls
src/command_modules/azure-cli-iot
src/command_modules/azure-cli-monitor
src/azure-cli-testsdk/azure/cli/testsdk/vcr_test_base.py # will eventually be removed

Просмотреть файл

@ -2,12 +2,12 @@
set -e
# build packages
. $(cd $(dirname $0); pwd)/artifacts.sh
# install flake 8
pip install -qqq flake8
echo "Run flake8."
flake8 --statistics --exclude=azure_bdist_wheel.py --append-config=./.flake8 ./src
flake8 --statistics --config=./.flake8
# build packages
. $(cd $(dirname $0); pwd)/artifacts.sh

Просмотреть файл

@ -26,6 +26,7 @@ from .utilities import find_recording_dir
logger = logging.getLogger('azure.cli.testsdk')
class CheckerMixin(object):
def _apply_kwargs(self, val):

Просмотреть файл

@ -36,7 +36,6 @@ class ResourceGroupPreparer(AbstractPreparer, SingleValueReplacer):
return {self.parameter_name: self.dev_setting_name,
self.parameter_name_for_location: self.dev_setting_location}
template = 'az group create --location {} --name {} --tag use=az-test'
execute(self.cli_ctx, template.format(self.location, name))
self.test_class_instance.kwargs[self.key] = name

Просмотреть файл

@ -20,9 +20,11 @@ from knack.log import get_logger
logger = get_logger(__name__)
def cli_main(cli, args):
return cli.invoke(args)
az_cli = AzCli(cli_name='az',
config_dir=GLOBAL_CONFIG_DIR,
config_env_var_prefix=ENV_VAR_PREFIX,
@ -38,7 +40,7 @@ try:
telemetry.start()
exit_code = cli_main(az_cli, sys.argv[1:])
if exit_code and exit_code != 0:
telemetry.set_failure()
else: