8000 Check for typing errors in Travis CI. · cool-RR/python-prompt-toolkit@7d3d357 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7d3d357

Browse files
Check for typing errors in Travis CI.
1 parent 5a4a1f5 commit 7d3d357

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ script:
2020
- coverage run -m pytest
2121

2222
# Run type checker.
23-
- mypy prompt_toolkit | grep -v "Name '_' already defined" | true
23+
- ./typecheck.sh || true
2424

2525
# Check wheather the imports were sorted correctly.
2626
# When this fails, please run ./tools/sort-imports.sh

prompt_toolkit/application/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
try:
9292
import contextvars
9393
except ImportError:
94-
import prompt_toolkit.eventloop.dummy_contextvars as contextvars
94+
import prompt_toolkit.eventloop.dummy_contextvars as contextvars # type: ignore
9595

9696

9797
__all__ = [

prompt_toolkit/shortcuts/progress_bar/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
try:
6161
import contextvars
6262
except ImportError:
63-
from prompt_toolkit.eventloop import dummy_contextvars as contextvars
63+
from prompt_toolkit.eventloop import dummy_contextvars as contextvars # type: ignore
6464

6565

6666
__all__ = [

typecheck.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
mypy prompt_toolkit | grep -v "Name '_' already defined" | (! grep ': error:')

0 commit comments

Comments
 (0)
0