Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.11
rev: v0.14.14
hooks:
- id: ruff-check
types_or: [python, pyi, jupyter, toml]
Expand Down
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keithley/Keithley_2450.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TYPE_CHECKING, Any, ClassVar, cast
from typing import TYPE_CHECKING, Any, ClassVar, Self, cast

import numpy as np
import numpy.typing as npt
Expand Down Expand Up @@ -132,7 +132,7 @@ def from_scpi_to_name(self, element_scpis: list[str]) -> list[str]:
return []
return [self.inverted_buffer_elements[element] for element in element_scpis]

def __enter__(self) -> "Keithley2450Buffer":
def __enter__(self) -> Self:
return self

def __exit__(
Expand Down
4 changes: 2 additions & 2 deletions src/qcodes/instrument_drivers/Keithley/Keithley_7510.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TYPE_CHECKING, Any, ClassVar, TypedDict, cast
from typing import TYPE_CHECKING, Any, ClassVar, Self, TypedDict, cast

import numpy as np
import numpy.typing as npt
Expand Down Expand Up @@ -276,7 +276,7 @@ def set_setpoints(
if label is not None:
self.setpoints.label = label

def __enter__(self) -> "Keithley7510Buffer":
def __enter__(self) -> Self:
return self

def __exit__(
Expand Down
4 changes: 2 additions & 2 deletions src/qcodes/logger/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from contextlib import contextmanager
from copy import copy
from datetime import datetime
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING, Any, Self

if TYPE_CHECKING:
from collections.abc import Iterator, Sequence
Expand Down Expand Up @@ -422,7 +422,7 @@ def __init__(
for h in self.stashed_handlers:
self.logger.removeHandler(h)

def __enter__(self) -> "LogCapture":
def __enter__(self) -> Self:
self.log_capture = io.StringIO()
self.string_handler = logging.StreamHandler(self.log_capture)
self.string_handler.setLevel(self.level)
Expand Down
Loading