Skip to content

Commit feb90c7

Browse files
tdsteinschloerke
andauthored
fix: import from typing_extensions instead of typing (#365)
Co-authored-by: Barret Schloerke <[email protected]>
1 parent 2a6d61b commit feb90c7

35 files changed

+69
-47
lines changed

examples/connect/databricks/fastapi/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
from __future__ import annotations
44

55
import os
6-
from typing import TYPE_CHECKING, Annotated
76

87
from databricks import sql
98
from databricks.sdk.core import Config, databricks_cli
109
from fastapi import FastAPI, Header
10+
from typing_extensions import TYPE_CHECKING, Annotated
1111

1212
from posit.connect.external.databricks import PositCredentialsStrategy
1313

integration/tests/posit/connect/test_content_item_permissions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING
4-
53
import pytest
4+
from typing_extensions import TYPE_CHECKING
65

76
from posit import connect
87

src/posit/connect/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import Any
3+
from typing_extensions import Any
44

55

66
def update_dict_values(obj: dict[str, Any], /, **kwargs: Any) -> None:

src/posit/connect/bundles.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from __future__ import annotations
44

55
import io
6-
from typing import TYPE_CHECKING, List
6+
7+
from typing_extensions import TYPE_CHECKING, List
78

89
from . import resources, tasks
910

src/posit/connect/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING, overload
6-
75
from requests import Response, Session
6+
from typing_extensions import TYPE_CHECKING, overload
87

98
from . import hooks, me
109
from .auth import Auth

src/posit/connect/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""Client configuration."""
22

33
import os
4-
from typing import Optional
4+
5+
from typing_extensions import Optional
56

67
from . import urls
78

src/posit/connect/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import functools
44
import weakref
5-
from typing import TYPE_CHECKING, Protocol
65

76
from packaging.version import Version
7+
from typing_extensions import TYPE_CHECKING, Protocol
88

99
if TYPE_CHECKING:
1010
from .client import Client

src/posit/connect/cursors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import TYPE_CHECKING, Any, Generator, List
4+
5+
from typing_extensions import TYPE_CHECKING, Any, Generator, List
56

67
if TYPE_CHECKING:
78
from .context import Context

src/posit/connect/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING, Any, Iterator, List, Mapping, MutableMapping, Optional
5+
from typing_extensions import TYPE_CHECKING, Any, Iterator, List, Mapping, MutableMapping, Optional
66

77
from .resources import Resources
88

src/posit/connect/environments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
from __future__ import annotations
44

55
from abc import abstractmethod
6-
from typing import Protocol
76

87
from typing_extensions import (
98
List,
109
Literal,
10+
Protocol,
1111
TypedDict,
1212
runtime_checkable,
1313
)

0 commit comments

Comments
 (0)