Skip to content

Commit affab62

Browse files
authored
Merge pull request #7804 from jenshnielsen/ruff_014_14
Update precommit hooks
2 parents f558c0e + d1d27b3 commit affab62

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.14.11
4+
rev: v0.14.14
55
hooks:
66
- id: ruff-check
77
types_or: [python, pyi, jupyter, toml]

src/qcodes/instrument_drivers/Keithley/Keithley_2450.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, Any, ClassVar, cast
1+
from typing import TYPE_CHECKING, Any, ClassVar, Self, cast
22

33
import numpy as np
44
import numpy.typing as npt
@@ -132,7 +132,7 @@ def from_scpi_to_name(self, element_scpis: list[str]) -> list[str]:
132132
return []
133133
return [self.inverted_buffer_elements[element] for element in element_scpis]
134134

135-
def __enter__(self) -> "Keithley2450Buffer":
135+
def __enter__(self) -> Self:
136136
return self
137137

138138
def __exit__(

src/qcodes/instrument_drivers/Keithley/Keithley_7510.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, Any, ClassVar, TypedDict, cast
1+
from typing import TYPE_CHECKING, Any, ClassVar, Self, TypedDict, cast
22

33
import numpy as np
44
import numpy.typing as npt
@@ -276,7 +276,7 @@ def set_setpoints(
276276
if label is not None:
277277
self.setpoints.label = label
278278

279-
def __enter__(self) -> "Keithley7510Buffer":
279+
def __enter__(self) -> Self:
280280
return self
281281

282282
def __exit__(

src/qcodes/logger/logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from contextlib import contextmanager
1616
from copy import copy
1717
from datetime import datetime
18-
from typing import TYPE_CHECKING, Any
18+
from typing import TYPE_CHECKING, Any, Self
1919

2020
if TYPE_CHECKING:
2121
from collections.abc import Iterator, Sequence
@@ -422,7 +422,7 @@ def __init__(
422422
for h in self.stashed_handlers:
423423
self.logger.removeHandler(h)
424424

425-
def __enter__(self) -> "LogCapture":
425+
def __enter__(self) -> Self:
426426
self.log_capture = io.StringIO()
427427
self.string_handler = logging.StreamHandler(self.log_capture)
428428
self.string_handler.setLevel(self.level)

0 commit comments

Comments
 (0)