summaryrefslogtreecommitdiffstats
path: root/build/plugins
diff options
context:
space:
mode:
authorarcadia-devtools <[email protected]>2022-03-26 13:04:55 +0300
committerarcadia-devtools <[email protected]>2022-03-26 13:04:55 +0300
commit78caba673687bcd49fbf2ce6d097d318282ff002 (patch)
tree7e87d11347d92113f9e39f03db2e61ce7943b5aa /build/plugins
parentd2fb88bc290f27a26b3ed7eb1932c5fb94cfd813 (diff)
intermediate changes
ref:110136b448f725022fe4a99944539b99fd3a0ebf
Diffstat (limited to 'build/plugins')
-rw-r--r--build/plugins/pybuild.py5
-rw-r--r--build/plugins/ytest.py3
2 files changed, 8 insertions, 0 deletions
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
index b3f8b3ad7c5..52ad6f3ef46 100644
--- a/build/plugins/pybuild.py
+++ b/build/plugins/pybuild.py
@@ -155,6 +155,11 @@ def add_python_lint_checks(unit, py_ver, files):
flake8_cfg = 'build/config/tests/flake8/flake8.conf'
unit.onadd_check(["flake8.py{}".format(py_ver), flake8_cfg] + resolved_files)
+ if files and unit.get('LINT_PY') == 'yes':
+ if is_py3(unit):
+ resolved_files = get_resolved_files()
+ black_cfg = 'devtools/ya/handlers/style/python_style_config.toml'
+ unit.onadd_check(['black', black_cfg] + resolved_files)
def is_py3(unit):
return unit.get("PYTHON3") == "yes"
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
index b9cb87c5447..2a6c0aab554 100644
--- a/build/plugins/ytest.py
+++ b/build/plugins/ytest.py
@@ -559,6 +559,9 @@ def onadd_check(unit, *args):
if check_type in ["flake8.py2", "flake8.py3"]:
script_rel_path = check_type
fork_mode = unit.get('TEST_FORK_MODE') or ''
+ elif check_type == "black":
+ script_rel_path = check_type
+ fork_mode = unit.get('TEST_FORK_MODE') or ''
elif check_type == "JAVA_STYLE":
if ymake_java_test and not unit.get('ALL_SRCDIRS') or '':
return