Skip to content
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

[pre-commit.ci] pre-commit autoupdate #240

Merged
merged 8 commits into from
Oct 7, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/[email protected].3
uses: snok/[email protected].4
- name: Install Package
run: poetry install
- name: Run pre-commit checks
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ repos:
- id: python-use-type-annotations
- id: python-check-blanket-type-ignore
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2
rev: 0.27.0
hooks:
- id: check-github-workflows
- id: check-github-actions
- id: check-dependabot
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.272'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.292'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.9.1
hooks:
- id: black
- repo: local
Expand Down
46 changes: 23 additions & 23 deletions docs/assets/deck.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 17 additions & 17 deletions docs/assets/demo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/assets/quickstart_code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ the [`Transition`][spiel.Transition] [protocol](https://docs.python.org/3/librar
The protocol is:

```python title="Transition Protocol"
--8<-- "../spiel/transitions/protocol.py"
--8<-- "spiel/transitions/protocol.py"
```

As an example, consider the [`Swipe`][spiel.Swipe] transition included in Spiel:

```python title="Swipe Transition"
--8<-- "../spiel/transitions/swipe.py"
--8<-- "spiel/transitions/swipe.py"
```

The transition effect is implemented using
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ markdown_extensions:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets:
base_path: ['docs']
base_path: ['docs', '.']
check_paths: true
- pymdownx.superfences
- pymdownx.tabbed:
Expand Down
1,593 changes: 830 additions & 763 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions spiel/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from functools import cached_property, partial
from pathlib import Path
from time import monotonic
from typing import Callable, ContextManager, Iterator
from typing import Callable, ClassVar, ContextManager, Iterator, List, Tuple

from rich.style import Style
from rich.text import Text
Expand Down Expand Up @@ -67,7 +67,7 @@ def load_deck(path: Path) -> Deck:

class SpielApp(App[None]):
CSS_PATH = "spiel.css"
BINDINGS = [
BINDINGS: ClassVar[List[Binding | Tuple[str, str, str]]] = [
Binding("d", "switch_screen('deck')", "Go to the Deck view."),
Binding("question_mark", "push_screen('help')", "Go to the Help view."),
Binding("i", "repl", "Switch to the REPL."),
Expand Down
4 changes: 3 additions & 1 deletion spiel/screens/deck.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from typing import ClassVar, List, Tuple

from textual.app import ComposeResult
from textual.binding import Binding

Expand All @@ -9,7 +11,7 @@


class DeckScreen(SpielScreen):
BINDINGS = [
BINDINGS: ClassVar[List[Binding | Tuple[str, str, str]]] = [
Binding("right", "next_slide", "Go to next slide."),
Binding("left", "prev_slide", "Go to previous slide."),
Binding("down", "next_row", "Go to next row of slides."),
Expand Down
4 changes: 3 additions & 1 deletion spiel/screens/help.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from typing import ClassVar, List, Tuple

from textual.app import ComposeResult
from textual.binding import Binding
from textual.containers import Container
Expand All @@ -19,7 +21,7 @@ class HelpScreen(SpielScreen):
}
"""

BINDINGS = [
BINDINGS: ClassVar[List[Binding | Tuple[str, str, str]]] = [
Binding("escape,enter", "pop_screen", "Return to the previous view."),
]

Expand Down
3 changes: 2 additions & 1 deletion spiel/screens/slide.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import inspect
from typing import ClassVar, List, Tuple

from textual.app import ComposeResult
from textual.binding import Binding
Expand All @@ -14,7 +15,7 @@


class SlideScreen(SpielScreen):
BINDINGS = [
BINDINGS: ClassVar[List[Binding | Tuple[str, str, str]]] = [
Binding("right", "next_slide", "Go to next slide."),
Binding("left", "prev_slide", "Go to previous slide."),
Binding("t", "trigger", "Trigger the current slide."),
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/test_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def test_help(runner: CliRunner) -> None:


def test_help_via_main() -> None:
result = subprocess.run([sys.executable, "-m", PACKAGE_NAME, "--help"])
result = subprocess.run([sys.executable, "-m", PACKAGE_NAME, "--help"], check=False)

assert result.returncode == 0