Skip to content

Commit bed2034

Browse files
jsonbaileyclaude
andcommitted
fix: Import Self from typing_extensions for Python 3.10 compat
mypy targets python_version = "3.10" but typing.Self was added in 3.11. Use unconditional typing_extensions import and remove the unnecessary from __future__ import annotations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 88c18b9 commit bed2034

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

packages/sdk/server-ai/src/ldai/models.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
from __future__ import annotations
2-
31
import warnings
42
from dataclasses import dataclass, field
53
from typing import Any, Callable, Dict, List, Literal, Optional, Union
64

7-
try:
8-
from typing import Self
9-
except ImportError:
10-
from typing_extensions import Self
5+
from typing_extensions import Self
116

127

138
@dataclass

0 commit comments

Comments
 (0)