Skip to content

Commit 9b17d3d

Browse files
⬆️🐍 Update dependency ty to v0.0.21 (#612)
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/predictor). <!--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 69bd396 commit 9b17d3d

5 files changed

Lines changed: 27 additions & 27 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ docs = [
8686
dev = [
8787
{include-group = "test"},
8888
"nox>=2025.11.12",
89-
"ty==0.0.20",
89+
"ty==0.0.21",
9090
]
9191

9292
[project.urls]

src/mqt/predictor/rl/helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_state_sample(max_qubits: int, path_training_circuits: Path, rng: Generat
7070
return qc, str(file_list[random_index])
7171

7272

73-
def create_feature_dict(qc: QuantumCircuit) -> dict[str, int | NDArray[np.float64]]:
73+
def create_feature_dict(qc: QuantumCircuit) -> dict[str, int | NDArray[np.float32]]:
7474
"""Creates a feature dictionary for a given quantum circuit.
7575
7676
Arguments:
@@ -79,7 +79,7 @@ def create_feature_dict(qc: QuantumCircuit) -> dict[str, int | NDArray[np.float6
7979
Returns:
8080
The feature dictionary for the given quantum circuit.
8181
"""
82-
feature_dict = {
82+
feature_dict: dict[str, int | NDArray[np.float32]] = {
8383
"num_qubits": qc.num_qubits,
8484
"depth": qc.depth(),
8585
}

src/mqt/predictor/rl/predictorenv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from pathlib import Path
2121

2222
from bqskit import Circuit
23+
from gymnasium.spaces import Space
2324
from qiskit.passmanager.base_tasks import Task
2425
from qiskit.transpiler import Target
2526

@@ -151,7 +152,7 @@ def __init__(
151152
self.has_parameterized_gates = False
152153
self.rng = np.random.default_rng(10)
153154

154-
spaces = {
155+
spaces: dict[str, Space] = {
155156
"num_qubits": Discrete(128),
156157
"depth": Discrete(1000000),
157158
"program_communication": Box(low=0, high=1, shape=(1,), dtype=np.float32),

tests/compilation/test_integration_further_SDKs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ def test_tket_routing(available_actions_dict: dict[PassType, list[Action]]) -> N
238238
pass_.apply(tket_qc)
239239

240240
qbs = tket_qc.qubits
241-
qubit_map = {qbs[i]: Qubit("q", i) for i in range(len(qbs))}
242-
tket_qc.rename_units(qubit_map)
241+
tket_qc.rename_units({qbs[i]: Qubit("q", i) for i in range(len(qbs))})
243242

244243
mapped_qc = tk_to_qiskit(tket_qc)
245244

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)