Skip to content

Commit

Permalink
Consolidate apply-lint into clang-format-precommit and fix test_async…
Browse files Browse the repository at this point in the history
…io test after linting html files (pyodide#1667)
  • Loading branch information
Hood Chatham authored Jun 26, 2021
1 parent 043c9cf commit 450a2d2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/tests/test_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async def test():
"""
)
time.sleep(0.1)
msg = "StopIteration: <!doctype html>"
msg = "StopIteration: <!DOCTYPE html>"
with pytest.raises(selenium.JavascriptException, match=msg):
selenium.run(
"""
Expand Down Expand Up @@ -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(
"""
Expand Down
17 changes: 0 additions & 17 deletions tools/apply-lint.sh

This file was deleted.

2 changes: 1 addition & 1 deletion tools/clang-format-precommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 450a2d2

Please sign in to comment.