File tree 3 files changed +17
-0
lines changed
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
846
846
847
847
dockerfile_base += """
848
848
RUN pip3 install beautysh
849
+ RUN pip3 install black
849
850
RUN pip3 install codespell
850
851
RUN pip3 install flake8
851
852
RUN pip3 install gitlint
852
853
RUN pip3 install inflection
854
+ RUN pip3 install isort
853
855
RUN pip3 install jsonschema
854
856
RUN pip3 install meson==0.63.0
855
857
RUN pip3 install protobuf
Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ LINTERS_ALL=( \
29
29
commit_spelling \
30
30
beautysh \
31
31
beautysh_sh \
32
+ black \
32
33
clang_format \
33
34
eslint \
34
35
flake8 \
36
+ isort \
35
37
prettier \
36
38
shellcheck \
37
39
)
@@ -176,6 +178,12 @@ function do_beautysh_sh() {
176
178
beautysh --force-function-style paronly " $@ "
177
179
}
178
180
181
+ LINTER_REQUIRE+=([black]=" black" )
182
+ LINTER_TYPES+=([black]=" python" )
183
+ function do_black() {
184
+ black -l 79 --preview " $@ "
185
+ }
186
+
179
187
LINTER_REQUIRE+=([eslint]=" eslint;.eslintrc.json;${CONFIG_PATH} /eslint-global-config.json" )
180
188
LINTER_IGNORE+=([eslint]=" .eslintignore" )
181
189
LINTER_TYPES+=([eslint]=" json" )
@@ -195,6 +203,12 @@ function do_flake8() {
195
203
# disagree on best practices.
196
204
}
197
205
206
+ LINTER_REQUIRE+=([isort]=" isort" )
207
+ LINTER_TYPES+=([isort]=" python" )
208
+ function do_isort() {
209
+ isort --profile black " $@ "
210
+ }
211
+
198
212
LINTER_REQUIRE+=([prettier]=" prettier;.prettierrc.yaml;${CONFIG_PATH} /prettierrc.yaml" )
199
213
LINTER_IGNORE+=([prettier]=" .prettierignore" )
200
214
LINTER_TYPES+=([prettier]=" json;markdown;yaml" )
Original file line number Diff line number Diff line change 20
20
from urllib .parse import urljoin
21
21
22
22
from git import Repo
23
+
23
24
# interpreter is not used directly but this resolves dependency ordering
24
25
# that would be broken if we didn't include it.
25
26
from mesonbuild import interpreter # noqa: F401
You can’t perform that action at this time.
0 commit comments