Skip to content

Commit 6cf8e2d

Browse files
Use uvx in GitHub workflows.
1 parent f1dea7e commit 6cf8e2d

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@ jobs:
1818
- uses: astral-sh/setup-uv@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
21-
- name: Install Dependencies
22-
run: |
23-
uv pip install . ruff mypy pytest readme_renderer
24-
uv pip list
2521
- name: Type Checker
2622
run: |
27-
mypy ptpython
28-
ruff check .
29-
ruff format --check .
30-
- name: Run Tests
23+
uvx mypy ptpython
24+
- name: Code formatting
25+
run: |
26+
uvx ruff check .
27+
uvx ruff format --check .
28+
- name: Tests
3129
run: |
32-
pytest tests/
30+
uvx --with . pytest tests/
3331
- name: Validate README.md
3432
# Ensure that the README renders correctly (required for uploading to PyPI).
3533
run: |
34+
uv pip install readme_renderer
3635
python -m readme_renderer README.rst > /dev/null

ptpython/history_browser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@
5858
from .utils import if_mousedown
5959

6060
if TYPE_CHECKING:
61+
from typing_extensions import TypeAlias
62+
6163
from .python_input import PythonInput
6264

6365
HISTORY_COUNT = 2000
6466

6567
__all__ = ["HistoryLayout", "PythonHistory"]
6668

67-
E = KeyPressEvent
69+
E: TypeAlias = KeyPressEvent
6870

6971
HELP_TEXT = """
7072
This interface is meant to select multiple lines from the

ptpython/key_bindings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
from .utils import document_is_multiline_python
2323

2424
if TYPE_CHECKING:
25+
from typing_extensions import TypeAlias
26+
2527
from .python_input import PythonInput
2628

2729
__all__ = [
@@ -30,7 +32,7 @@
3032
"load_confirm_exit_bindings",
3133
]
3234

33-
E = KeyPressEvent
35+
E: TypeAlias = KeyPressEvent
3436

3537

3638
@Condition

0 commit comments

Comments
 (0)