Skip to content

Commit c885eb8

Browse files
committed
More typing extensions impl
1 parent 7bb5c04 commit c885eb8

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/posit/connect/resources.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
from dataclasses import dataclass
77
from typing import TYPE_CHECKING, Any, Generic, List, Optional, Sequence, TypeVar, overload
88

9-
from typing_extensions import Self
10-
119
if TYPE_CHECKING:
1210
import requests
1311

12+
from ._typing_extensions import Self
1413
from .context import Context
1514
from .urls import Url
1615

@@ -176,12 +175,12 @@ def __getitem__(self, index: slice) -> Sequence[T]: ...
176175
def __getitem__(self, index):
177176
return self._data[index]
178177

179-
def __iter__(self):
180-
return iter(self._data)
181-
182178
def __len__(self) -> int:
183179
return len(self._data)
184180

181+
def __iter__(self):
182+
return iter(self._data)
183+
185184
def __str__(self) -> str:
186185
return str(self._data)
187186

src/posit/connect/vanities.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
from typing import Callable, List, Optional, TypedDict
2-
3-
from typing_extensions import NotRequired, Required, Unpack
1+
from typing import Callable, List, Optional
42

3+
from ._typing_extensions import NotRequired, Required, TypedDict, Unpack
54
from .errors import ClientError
65
from .resources import Resource, ResourceParameters, Resources
76

0 commit comments

Comments
 (0)