mirror of https://github.com/pyodide/pyodide.git
Consolidate apply-lint into clang-format-precommit and fix test_asyncio test after linting html files (#1667)
This commit is contained in:
parent
043c9cf360
commit
450a2d21e3
3
Makefile
3
Makefile
|
@ -157,9 +157,6 @@ lint: node_modules/.installed
|
|||
conftest.py \
|
||||
docs
|
||||
|
||||
apply-lint:
|
||||
./tools/apply-lint.sh
|
||||
|
||||
benchmark: all
|
||||
python benchmark/benchmark.py $(HOSTPYTHON) build/benchmarks.json
|
||||
python benchmark/plot_benchmark.py build/benchmarks.json build/benchmarks.png
|
||||
|
|
|
@ -174,7 +174,7 @@ def test_await_fetch(selenium):
|
|||
"""
|
||||
)
|
||||
time.sleep(0.1)
|
||||
msg = "StopIteration: <!doctype html>"
|
||||
msg = "StopIteration: <!DOCTYPE html>"
|
||||
with pytest.raises(selenium.JavascriptException, match=msg):
|
||||
selenium.run(
|
||||
"""
|
||||
|
@ -293,7 +293,7 @@ def test_eval_code_await_fetch(selenium):
|
|||
"""
|
||||
)
|
||||
time.sleep(0.1)
|
||||
msg = "StopIteration: <!doctype html>"
|
||||
msg = "StopIteration: <!DOCTYPE html>"
|
||||
with pytest.raises(selenium.JavascriptException, match=msg):
|
||||
selenium.run(
|
||||
"""
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
FILES="$(git ls-files --others --exclude-standard '*.js' '*.html')"
|
||||
FILES+=" $(git diff HEAD --name-only '*.js' '*.html')"
|
||||
if [[ $FILES != " " ]]; then
|
||||
prettier --write ${FILES}
|
||||
fi
|
||||
|
||||
FILES="$(git ls-files --others --exclude-standard '*.c' '*.h')"
|
||||
FILES+=" $(git diff HEAD --name-only '*.c' '*.h')"
|
||||
if [[ $FILES != " " ]]; then
|
||||
clang-format-6.0 -i -verbose ${FILES}
|
||||
fi
|
||||
|
||||
FILES="$(git ls-files --others --exclude-standard '*.py')"
|
||||
FILES+=" $(git diff HEAD --name-only '*.py')"
|
||||
if [[ $FILES != " " ]]; then
|
||||
black ${FILES}
|
||||
fi
|
|
@ -6,7 +6,7 @@ if [ -n "$FILES" ]; then
|
|||
git add $FILES
|
||||
fi
|
||||
|
||||
FILES=$(git diff --cached --name-only *.js)
|
||||
FILES=$(git diff --cached --name-only *.js '*.html')
|
||||
if [ -n "$FILES" ]; then
|
||||
# Change files, stage changes
|
||||
./node_modules/.bin/prettier --write $FILES
|
||||
|
|
Loading…
Reference in New Issue