Skip to content

Commit

Permalink
Merge pull request #20 from shenanigansd/br/bump-pre-commit
Browse files Browse the repository at this point in the history
Bump pre-commit hooks
  • Loading branch information
salt-die authored Sep 12, 2024
2 parents 65a1752 + d2889ea commit 0b45a3e
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sphinx-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
publish_dir: docs/_build/html
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
force_orphan: true
force_orphan: true
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
salt-die <[email protected]> <[email protected]>
salt-die <[email protected]> <[email protected]>
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
exclude: ^docs/
exclude: ^docs/|((.txt)|(.ans)$)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.6.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
1 change: 1 addition & 0 deletions examples/advanced/rubiks/rubiks/rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
All functions re-use the same buffer array. To create new arrays from rotation
functions, use `copy`.
"""

import numpy as np

_ROTATION_BUFFER = np.zeros((3, 3), dtype=float)
Expand Down
1 change: 1 addition & 0 deletions examples/advanced/slime.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Slime simulation."""

import asyncio

import cv2
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/assets/fonts/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The Noto fonts included are licensed under the Open Font License. These fonts can be found at https://fonts.google.com/noto.
The Noto fonts included are licensed under the Open Font License. These fonts can be found at https://fonts.google.com/noto.
1 change: 1 addition & 0 deletions examples/basic/data_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""An example usage of data tables."""

from batgrl.app import App
from batgrl.gadgets.data_table import ColumnStyle, DataTable

Expand Down
1 change: 1 addition & 0 deletions examples/basic/menu.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A simple menu example."""

from batgrl.app import App
from batgrl.gadgets.menu import MenuBar
from batgrl.gadgets.text import Text
Expand Down
1 change: 1 addition & 0 deletions examples/basic/scroll_view.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""ScrollView example."""

from batgrl.app import App
from batgrl.colors import BLUE, GREEN, RED, gradient
from batgrl.gadgets.scroll_view import ScrollView
Expand Down
1 change: 1 addition & 0 deletions examples/basic/video_in_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
`Video.source` can be a `pathlib.Path` to a video, an URL as a string, or an int
for a capturing device.
"""

from pathlib import Path

from batgrl.app import App
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ ignore = [
]
fixable = ["ALL"]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.pycodestyle]
[tool.ruff.lint.pycodestyle]
max-doc-length=88
1 change: 1 addition & 0 deletions src/batgrl/colors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Color-related functions and data structures."""

from .color_types import AColor, Color, ColorPair, ColorTheme
from .colors import (
ABLACK,
Expand Down
1 change: 1 addition & 0 deletions src/batgrl/colors/colors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Commonly used colors."""

from pygments.style import Style
from pygments.token import (
Comment,
Expand Down
1 change: 1 addition & 0 deletions src/batgrl/easings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Easing functions."""

from collections.abc import Callable
from math import cos, pi, sin
from typing import Literal
Expand Down
1 change: 1 addition & 0 deletions src/batgrl/emojis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Source: https://github.com/markdown-templates/markdown-emojis
"""

EMOJIS = {
"100": "💯",
"1234": "🔢",
Expand Down
1 change: 1 addition & 0 deletions src/batgrl/gadgets/text_effects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
--------
Modifying the text size while effect is running will break the effect.
"""

from .beams import beams_effect
from .black_hole import black_hole_effect
from .ring import ring_effect
Expand Down
13 changes: 7 additions & 6 deletions src/batgrl/gadgets/text_effects/beams.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A beam effect."""

import asyncio
from collections.abc import Callable
from random import random, shuffle
Expand Down Expand Up @@ -65,9 +66,9 @@ def on_progress(*args):
nonlocal last_bottom
if beam.bottom != last_bottom:
pass_count[last_bottom + 1 : beam.bottom + 1, beam.x] += 1
cover.canvas[last_bottom + 1 : beam.bottom + 1, beam.x][
"fg_color"
] = WHITE
cover.canvas[last_bottom + 1 : beam.bottom + 1, beam.x]["fg_color"] = (
WHITE
)
last_bottom = beam.bottom

elif kind == "left":
Expand All @@ -88,9 +89,9 @@ def on_progress(*args):
nonlocal last_right
if beam.right != last_right:
pass_count[beam.y, last_right + 1 : beam.right + 1] += 1
cover.canvas[beam.y, last_right + 1 : beam.right + 1][
"fg_color"
] = WHITE
cover.canvas[beam.y, last_right + 1 : beam.right + 1]["fg_color"] = (
WHITE
)
last_right = beam.right

else:
Expand Down
1 change: 1 addition & 0 deletions src/batgrl/gadgets/text_effects/black_hole.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A black hole effect."""

import asyncio
from random import choice

Expand Down
1 change: 1 addition & 0 deletions src/batgrl/gadgets/text_effects/spotlights.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""A spotlight effect."""

import asyncio
from dataclasses import dataclass
from random import randrange
Expand Down
1 change: 1 addition & 0 deletions src/batgrl/spinners.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
--------
`examples/basic/spinners.py`.
"""

SPINNERS = {
"dots": ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
"dots2": ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"],
Expand Down

0 comments on commit 0b45a3e

Please sign in to comment.