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
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: check-docstring-first
- id: check-executables-have-shebangs
Expand All @@ -17,23 +17,23 @@ repos:
args: [--fix=lf]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 24.2.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.19.1
hooks:
- id: mypy
exclude: "village/pybpodapi/.*"
additional_dependencies:
- types-setuptools
- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
rev: "0.51"
hooks:
- id: check-manifest
args: [--no-build-isolation]
Expand All @@ -42,7 +42,7 @@ repos:
- wheel
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in pyproject.toml
rev: v2.2.6
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies:
Expand Down
10 changes: 5 additions & 5 deletions village/pybpodapi/state_machine/state_machine_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def build_message(self):
tmp += [transition[0]]
dest_state = transition[1]
tmp += [
(self.total_states_added if math.isnan(dest_state) else dest_state)
self.total_states_added if math.isnan(dest_state) else dest_state
]
message += tmp
logger.debug("INPUT MATRIX: %s", tmp)
Expand Down Expand Up @@ -202,7 +202,7 @@ def build_message(self):
- self.hardware.channels.events_positions.globalTimerStart
]
tmp += [
(self.total_states_added if math.isnan(dest_state) else dest_state)
self.total_states_added if math.isnan(dest_state) else dest_state
]
message += tmp
logger.debug("GLOBAL_TIMER_START_MATRIX: %s", tmp)
Expand All @@ -222,7 +222,7 @@ def build_message(self):
- self.hardware.channels.events_positions.globalTimerEnd
]
tmp += [
(self.total_states_added if math.isnan(dest_state) else dest_state)
self.total_states_added if math.isnan(dest_state) else dest_state
]
message += tmp
logger.debug("GLOBAL_TIMER_END_MATRIX: %s", tmp)
Expand All @@ -242,7 +242,7 @@ def build_message(self):
- self.hardware.channels.events_positions.globalCounter
]
tmp += [
(self.total_states_added if math.isnan(dest_state) else dest_state)
self.total_states_added if math.isnan(dest_state) else dest_state
]
message += tmp
logger.debug("GLOBAL_COUNTER_MATRIX: %s", tmp)
Expand All @@ -261,7 +261,7 @@ def build_message(self):
transition[0] - self.hardware.channels.events_positions.condition
]
tmp += [
(self.total_states_added if math.isnan(dest_state) else dest_state)
self.total_states_added if math.isnan(dest_state) else dest_state
]

message += tmp
Expand Down
2 changes: 1 addition & 1 deletion village/scripts/parse_bpod_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def parse_input_to_tuple_override(msg: str) -> tuple[str, int, int]:


def parse_output_to_tuple_override(
message: str | tuple[str, int]
message: str | tuple[str, int],
) -> tuple[str, Any, int]:
# Convert the message to string if it's a tuple
msg = str(message)
Expand Down
Loading