diff options
author | prettyboy <prettyboy@yandex-team.com> | 2023-09-28 10:58:37 +0300 |
---|---|---|
committer | prettyboy <prettyboy@yandex-team.com> | 2023-09-28 11:27:03 +0300 |
commit | 05537f2de914e733a0a4fd04d660e7ad0fa75698 (patch) | |
tree | 9b84103a50fd343e2cfec82544ab7ebb705cca7c /build/plugins/pybuild.py | |
parent | 2d424917d8a7647193e265a1f5f03aee582725bf (diff) | |
download | ydb-05537f2de914e733a0a4fd04d660e7ad0fa75698.tar.gz |
[build/plugins/pybuild] Disable flake8 migrations for opensource ya test
Diffstat (limited to 'build/plugins/pybuild.py')
-rw-r--r-- | build/plugins/pybuild.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index 9714dbc8b7..31683217e6 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -161,19 +161,26 @@ def add_python_lint_checks(unit, py_ver, files): resolved_files = get_resolved_files() if resolved_files: flake8_cfg = 'build/config/tests/flake8/flake8.conf' + migrations_cfg = 'build/rules/flake8/migrations.yaml' resource = "build/external_resources/flake8_py{}".format(py_ver) lint_name = "py{}_flake8".format(py_ver) params = [lint_name, "tools/flake8_linter/flake8_linter"] params += ["FILES"] + resolved_files params += ["GLOBAL_RESOURCES", resource] - params += ["CONFIGS", flake8_cfg, "build/rules/flake8/migrations.yaml"] params += [ "FILE_PROCESSING_TIME", unit.get("FLAKE8_FILE_PROCESSING_TIME") or DEFAULT_FLAKE8_FILE_PROCESSING_TIME, ] + extra_params = [] - if unit.get("DISABLE_FLAKE8_MIGRATIONS") == "yes": + # Don't use migration config in opensource + if unit.get("OPENSOURCE") == "yes" or unit.get("DISABLE_FLAKE8_MIGRATIONS") == "yes": extra_params.append("DISABLE_FLAKE8_MIGRATIONS=yes") + config_files = [flake8_cfg, ''] + else: + config_files = [flake8_cfg, migrations_cfg] + params += ["CONFIGS"] + config_files + if extra_params: params += ["EXTRA_PARAMS"] + extra_params unit.on_add_linter_check(params) |