Skip to content

Use uvx in GitHub workflows. #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,21 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
- name: Type Checking
run: |
uv pip install . ruff mypy pytest readme_renderer
uv pip list
- name: Type Checker
uvx --with . mypy ptpython
- name: Code formatting
run: |
mypy ptpython
ruff check .
ruff format --check .
- name: Run Tests
uvx ruff check .
uvx ruff format --check .
- name: Unit test
run: |
pytest tests/
uvx --with . pytest tests/
- name: Validate README.md
# Ensure that the README renders correctly (required for uploading to PyPI).
run: |
uv pip install readme_renderer
python -m readme_renderer README.rst > /dev/null
4 changes: 3 additions & 1 deletion ptpython/history_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@
from .utils import if_mousedown

if TYPE_CHECKING:
from typing_extensions import TypeAlias

from .python_input import PythonInput

HISTORY_COUNT = 2000

__all__ = ["HistoryLayout", "PythonHistory"]

E = KeyPressEvent
E: TypeAlias = KeyPressEvent

HELP_TEXT = """
This interface is meant to select multiple lines from the
Expand Down
4 changes: 3 additions & 1 deletion ptpython/key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from .utils import document_is_multiline_python

if TYPE_CHECKING:
from typing_extensions import TypeAlias

from .python_input import PythonInput

__all__ = [
Expand All @@ -30,7 +32,7 @@
"load_confirm_exit_bindings",
]

E = KeyPressEvent
E: TypeAlias = KeyPressEvent


@Condition
Expand Down
Loading