-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[pre-commit.ci] pre-commit autoupdate #7831
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
Open
pre-commit-ci
wants to merge
1
commit into
main
Choose a base branch
from
pre-commit-ci-update-config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+2
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2edb55b
to
7f202a1
Compare
twiecki
approved these changes
Jul 1, 2025
twiecki
requested changes
Jul 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pymc/distributions/multivariate.py:2532:32: RUF005 Consider `(*size[:-1], 1)` instead of concatenation
|
2530 | sticks = np.concatenate(
2531 | (
2532 | np.ones(shape=(size[:-1] + (1,))),
| ^^^^^^^^^^^^^^^^ RUF005
2533 | np.cumprod(1 - betas[..., :-1], axis=-1),
2534 | ),
|
= help: Replace with `(*size[:-1], 1)`
pymc/distributions/timeseries.py:197:29: RUF005 Consider iterable unpacking instead of concatenation
|
195 | support_shape = None
196 | if steps is not None:
197 | support_shape = (steps,) + (dist_shape[len(dist_shape) - dist_ndim_supp :])
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF005
198 | support_shape = get_support_shape(
199 | support_shape=support_shape,
|
= help: Replace with iterable unpacking
pymc/sampling/parallel.py:385:20: RUF005 Consider `(proc, *msg[1:])` instead of concatenation
|
383 | proc._readable = True
384 | proc._num_samples += 1
385 | return (proc,) + msg[1:]
| ^^^^^^^^^^^^^^^^^ RUF005
386 | else:
387 | raise ValueError("Sampler sent bad message.")
|
= help: Replace with `(proc, *msg[1:])`
pymc/variational/opvi.py:1622:24: RUF005 Consider `[*self.groups[:2], "...", *self.groups[-2:]]` instead of concatenation
|
1620 | return "Approximation{" + " & ".join(map(str, self.groups)) + "}"
1621 | else:
1622 | forprint = self.groups[:2] + ["..."] + self.groups[-2:]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF005
1623 | return "Approximation{" + " & ".join(map(str, forprint)) + "}"
|
= help: Replace with `[*self.groups[:2], "...", *self.groups[-2:]]`
tests/test_pytensorf.py:128:25: RUF005 Consider `(*shape_ones[:dim], -1, *shape_ones[dim + 1:])` instead of concatenation
|
126 | fancy_index.append(indices)
127 | else:
128 | ind_shape = shape_ones[:dim] + (-1,) + shape_ones[dim + 1 :]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF005
129 | fancy_index.append(np.arange(n).reshape(ind_shape))
|
= help: Replace with `(*shape_ones[:dim], -1, *shape_ones[dim + 1:])`
7f3318d
to
4501df9
Compare
5916b1a
to
08f1883
Compare
08f1883
to
1a5098c
Compare
f047807
to
7172830
Compare
7172830
to
1f1ccc3
Compare
1f1ccc3
to
590cffa
Compare
updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.11.13 → v0.12.12](astral-sh/ruff-pre-commit@v0.11.13...v0.12.12)
590cffa
to
65b1f8f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
updates:
📚 Documentation preview 📚: https://pymc--7831.org.readthedocs.build/en/7831/