File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -846,10 +846,12 @@ RUN apt-get update && apt-get dist-upgrade -yy
846846
847847dockerfile_base += """
848848RUN pip3 install beautysh
849+ RUN pip3 install black
849850RUN pip3 install codespell
850851RUN pip3 install flake8
851852RUN pip3 install gitlint
852853RUN pip3 install inflection
854+ RUN pip3 install isort
853855RUN pip3 install jsonschema
854856RUN pip3 install meson==0.63.0
855857RUN pip3 install protobuf
Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ LINTERS_ALL=( \
2929 commit_spelling \
3030 beautysh \
3131 beautysh_sh \
32+ black \
3233 clang_format \
3334 eslint \
3435 flake8 \
36+ isort \
3537 prettier \
3638 shellcheck \
3739 )
@@ -176,6 +178,12 @@ function do_beautysh_sh() {
176178 beautysh --force-function-style paronly " $@ "
177179}
178180
181+ LINTER_REQUIRE+=([black]=" black" )
182+ LINTER_TYPES+=([black]=" python" )
183+ function do_black() {
184+ black -l 79 --preview " $@ "
185+ }
186+
179187LINTER_REQUIRE+=([eslint]=" eslint;.eslintrc.json;${CONFIG_PATH} /eslint-global-config.json" )
180188LINTER_IGNORE+=([eslint]=" .eslintignore" )
181189LINTER_TYPES+=([eslint]=" json" )
@@ -195,6 +203,12 @@ function do_flake8() {
195203 # disagree on best practices.
196204}
197205
206+ LINTER_REQUIRE+=([isort]=" isort" )
207+ LINTER_TYPES+=([isort]=" python" )
208+ function do_isort() {
209+ isort --profile black " $@ "
210+ }
211+
198212LINTER_REQUIRE+=([prettier]=" prettier;.prettierrc.yaml;${CONFIG_PATH} /prettierrc.yaml" )
199213LINTER_IGNORE+=([prettier]=" .prettierignore" )
200214LINTER_TYPES+=([prettier]=" json;markdown;yaml" )
Original file line number Diff line number Diff line change 2020from urllib .parse import urljoin
2121
2222from git import Repo
23+
2324# interpreter is not used directly but this resolves dependency ordering
2425# that would be broken if we didn't include it.
2526from mesonbuild import interpreter # noqa: F401
You can’t perform that action at this time.
0 commit comments