Skip to content
Open
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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
# debian/patches needs whitespace at end of line
Expand All @@ -19,7 +19,7 @@ repos:
# - id: docformatter

- repo: https://github.com/rstcheck/rstcheck
rev: "v6.2.4"
rev: "v6.2.5"
hooks:
- id: rstcheck
args:
Expand All @@ -33,18 +33,18 @@ repos:
]

- repo: https://github.com/pycqa/isort
rev: 6.0.0
rev: 9.0.0a3
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 25.1.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.3.1
hooks:
- id: black

# https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.3.0
hooks:
- id: flake8
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _handle(self, dummy_proxy, event_type, event, dummy_refcon):
initialisation.
"""
try:
(px, py) = Quartz.CGEventGetLocation(event)
px, py = Quartz.CGEventGetLocation(event)
except AttributeError:
# This happens during teardown of the virtual machine
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def add_hotspot(self, hotspot, xy):
The hotspot must fit inside the bounds of the virtual device. If
it does not then an ``AssertError`` is raised.
"""
(x, y) = xy
x, y = xy
assert 0 <= x <= self.width - hotspot.width
assert 0 <= y <= self.height - hotspot.height

Expand Down Expand Up @@ -117,7 +117,7 @@ def refresh(self):
self._device.display(im)

def _crop_box(self):
(left, top) = self._position
left, top = self._position
right = left + self._device.width
bottom = top + self._device.height

Expand Down
5 changes: 1 addition & 4 deletions packages/pitop/pitop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
)
from pitop.pma import ServoMotorSetting
from pitop.pma import ServoMotorSetting as ServoMotorState
from pitop.pma import (
SoundSensor,
UltrasonicSensor,
)
from pitop.pma import SoundSensor, UltrasonicSensor
from pitop.pma.parameters import BrakingType, Direction, ForwardDirection

# Robotics
Expand Down
Loading