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 #46

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.8.4'
rev: 'v0.9.1'
hooks:
# Run the linter.
- id: ruff
Expand All @@ -27,7 +27,7 @@ repos:


- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.0
rev: v1.14.1
hooks:
- id: mypy

Expand Down
2 changes: 1 addition & 1 deletion src/mps_motion/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def find_time_index(t_star, default):
)
reference_frame = data.time_stamps[reference_frame_index]
logger.info(
f"Found reference frame at index {reference_frame_index} " f"and time {reference_frame:.2f}",
f"Found reference frame at index {reference_frame_index} and time {reference_frame:.2f}",
)

u = opt_flow.get_displacements(reference_frame=reference_frame)
Expand Down
7 changes: 3 additions & 4 deletions src/mps_motion/motion_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def estimate_referece_image_from_velocity(
inds = np.isclose(v, background, atol=np.abs(v.max() - v.min()) * rel_tol)

msg = (
"Unable to find any values at the baseline. "
"Please try a smaller tolerance when estimating the reference image"
"Unable to find any values at the baseline. Please try a smaller tolerance when estimating the reference image"
)
if not inds.any():
# No values are this close to the baseline
Expand Down Expand Up @@ -132,7 +131,7 @@ def get_reference_image(

except ValueError:
refs = RefFrames._member_names_
msg = "Expected reference frame to be an integer or one of " f"{refs}, got {reference_frame}"
msg = f"Expected reference frame to be an integer or one of {refs}, got {reference_frame}"
if str(reference_frame) not in refs:
raise ValueError(msg)
reference_image = getattr(np, str(reference_frame))(frames, axis=2)
Expand Down Expand Up @@ -335,4 +334,4 @@ def get_velocities(
return self._velocity

def __repr__(self):
return f"{self.__class__.__name__}(" f"data={self.data}, flow_algorithm={self.flow_algorithm})"
return f"{self.__class__.__name__}(data={self.data}, flow_algorithm={self.flow_algorithm})"
Loading