Skip to content

[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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Jun 23, 2025

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from e7f194f to 2edb55b Compare June 23, 2025 17:13
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.13 β†’ v0.12.1](astral-sh/ruff-pre-commit@v0.11.13...v0.12.1)
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 2edb55b to 7f202a1 Compare June 30, 2025 17:07
Copy link
Member

@twiecki twiecki left a 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:])`
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant