Skip to content

Commit 8bd80b4

Browse files
⬆️🐍 Update dependency ty to v0.0.21 (#812)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [ty](https://redirect.github.com/astral-sh/ty) ([changelog](https://redirect.github.com/astral-sh/ty/blob/main/CHANGELOG.md)) | `==0.0.20` → `==0.0.21` | ![age](https://developer.mend.io/api/mc/badges/age/pypi/ty/0.0.21?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ty/0.0.20/0.0.21?slim=true) | --- ### Release Notes <details> <summary>astral-sh/ty (ty)</summary> ### [`v0.0.21`](https://redirect.github.com/astral-sh/ty/blob/HEAD/CHANGELOG.md#0021) [Compare Source](https://redirect.github.com/astral-sh/ty/compare/0.0.20...0.0.21) Released on 2026-03-05. ##### Bug fixes - Avoid stack overflow with recursive typevar ([#&#8203;23652](https://redirect.github.com/astral-sh/ruff/pull/23652)) - Fix panic on incomplete except handlers ([#&#8203;23708](https://redirect.github.com/astral-sh/ruff/pull/23708)) - Allow unions of different-length iterables in `*args` unpacking into optional positional parameters ([#&#8203;23124](https://redirect.github.com/astral-sh/ruff/pull/23124)) - Don't replace `Any` attributes with `object` after `isinstance` narrowing ([#&#8203;23725](https://redirect.github.com/astral-sh/ruff/pull/23725)) ##### LSP server - Exclude decorators from class/def code folding ([#&#8203;23543](https://redirect.github.com/astral-sh/ruff/pull/23543)) - Fix handling of non-Python text documents ([#&#8203;23704](https://redirect.github.com/astral-sh/ruff/pull/23704)) ##### Configuration - Add `all` selector to `ty.json` schema ([#&#8203;23721](https://redirect.github.com/astral-sh/ruff/pull/23721)) - Fix precedence of `all` selector in TOML configurations ([#&#8203;23723](https://redirect.github.com/astral-sh/ruff/pull/23723)) - Make `all` selector case-sensitive ([#&#8203;23713](https://redirect.github.com/astral-sh/ruff/pull/23713)) ##### Type checking - Add `invalid-enum-member-annotation` lint rule ([#&#8203;23648](https://redirect.github.com/astral-sh/ruff/pull/23648)) - Add a diagnostic for an unused awaitable ([#&#8203;23650](https://redirect.github.com/astral-sh/ruff/pull/23650)) - Add a diagnostic if a `TypeVar` is used to specialize a `ParamSpec`, or vice versa ([#&#8203;23738](https://redirect.github.com/astral-sh/ruff/pull/23738)) - Add more type-variable default validation ([#&#8203;23639](https://redirect.github.com/astral-sh/ruff/pull/23639)) - Add unbound type variable detection in annotations ([#&#8203;23641](https://redirect.github.com/astral-sh/ruff/pull/23641)) - Apply narrowing to walrus values ([#&#8203;23687](https://redirect.github.com/astral-sh/ruff/pull/23687)) - Do not union `Unknown` into unannotated container types ([#&#8203;23718](https://redirect.github.com/astral-sh/ruff/pull/23718)) - Avoid inferring generics with negative intersections ([#&#8203;23750](https://redirect.github.com/astral-sh/ruff/pull/23750)) - More precise types for `name` and `value` of an enum ([#&#8203;23683](https://redirect.github.com/astral-sh/ruff/pull/23683)) - Better preserve user-provided union order in inferred specializations ([#&#8203;23715](https://redirect.github.com/astral-sh/ruff/pull/23715)) - Support narrowing in ternary expressions ([#&#8203;23726](https://redirect.github.com/astral-sh/ruff/pull/23726)) - Validate bare ParamSpec usage in type annotations, and support stringified ParamSpecs as the first argument to `Callable` ([#&#8203;23625](https://redirect.github.com/astral-sh/ruff/pull/23625)) ##### Contributors - [@&#8203;charliermarsh](https://redirect.github.com/charliermarsh) - [@&#8203;zsol](https://redirect.github.com/zsol) - [@&#8203;Gankra](https://redirect.github.com/Gankra) - [@&#8203;MichaReiser](https://redirect.github.com/MichaReiser) - [@&#8203;AlexWaygood](https://redirect.github.com/AlexWaygood) - [@&#8203;rizzip](https://redirect.github.com/rizzip) - [@&#8203;iksuddle](https://redirect.github.com/iksuddle) - [@&#8203;dcreager](https://redirect.github.com/dcreager) - [@&#8203;BurntSushi](https://redirect.github.com/BurntSushi) - [@&#8203;carljm](https://redirect.github.com/carljm) - [@&#8203;oconnor663](https://redirect.github.com/oconnor663) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/munich-quantum-toolkit/ddsim). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My42Ni40IiwidXBkYXRlZEluVmVyIjoiNDMuNjYuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwicHl0aG9uIl19--> --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
1 parent 930637b commit 8bd80b4

3 files changed

Lines changed: 28 additions & 25 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,5 +371,5 @@ dev = [
371371
{include-group = "build"},
372372
{include-group = "test"},
373373
"nox>=2025.11.12",
374-
"ty==0.0.20",
374+
"ty==0.0.21",
375375
]

python/mqt/ddsim/primitives/sampler.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from __future__ import annotations
1212

13-
from typing import TYPE_CHECKING
13+
from typing import TYPE_CHECKING, cast
1414

1515
import numpy as np
1616
from mqt.core import load
@@ -28,7 +28,7 @@
2828
from mqt.ddsim.pyddsim import CircuitSimulator
2929

3030
if TYPE_CHECKING:
31-
from collections.abc import Iterable
31+
from collections.abc import Iterable, Mapping
3232

3333
from qiskit.circuit import ClassicalRegister
3434
from qiskit.primitives.containers import SamplerPubLike
@@ -134,7 +134,10 @@ def _get_bit_arrays(
134134
}
135135
for count in counts
136136
]
137-
bit_arrays[creg.name] = BitArray.from_counts(creg_counts, creg.size)
137+
bit_arrays[creg.name] = BitArray.from_counts(
138+
counts=cast("Iterable[Mapping[str | int, int]]", creg_counts),
139+
num_bits=creg.size,
140+
)
138141
start_index -= creg.size
139142

140143
return bit_arrays

uv.lock

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)