You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# TODO-barret: Replace with Resource class from https://github.com/posit-dev/posit-sdk-py/pull/364/files#diff-94b7dc3c7d7d7c7b1a5f25e06c37df5fc53e1921cb10d41d4f04b18a715fae55R72
20
+
classResourceP(Protocol):
21
+
def__getitem__(self, key: Hashable, /) ->Any: ...
22
+
23
+
24
+
# ContentItem Repository uses a PATCH method, not a PUT for updating.
Copy file name to clipboardExpand all lines: src/posit/connect/content.py
+3-133Lines changed: 3 additions & 133 deletions
Original file line number
Diff line number
Diff line change
@@ -4,31 +4,28 @@
4
4
5
5
importposixpath
6
6
importtime
7
-
fromabcimportabstractmethod
8
7
9
8
fromtyping_extensionsimport (
10
9
TYPE_CHECKING,
11
10
Any,
12
-
Hashable,
13
11
List,
14
12
Literal,
15
13
NotRequired,
16
14
Optional,
17
-
Protocol,
18
15
Required,
19
16
TypedDict,
20
17
Unpack,
21
18
overload,
22
19
)
23
20
24
21
from . importtasks
22
+
from ._repositoryimportContentItemRepositoryMixin
25
23
from .bundlesimportBundles
26
24
from .contextimportrequires
27
25
from .envimportEnvVars
28
-
from .errorsimportClientError
29
26
from .oauth.associationsimportContentItemAssociations
30
27
from .permissionsimportPermissions
31
-
from .resourcesimportActive, Resource, Resources, _Resource, _ResourceSequence
28
+
from .resourcesimportActive, Resource, Resources, _ResourceSequence
32
29
from .tagsimportContentItemTags
33
30
from .vanitiesimportVanityMixin
34
31
from .variantsimportVariants
@@ -40,82 +37,11 @@
40
37
from .tasksimportTask
41
38
42
39
43
-
# TODO-barret: Replace with Resource class from https://github.com/posit-dev/posit-sdk-py/pull/364/files#diff-94b7dc3c7d7d7c7b1a5f25e06c37df5fc53e1921cb10d41d4f04b18a715fae55R72
44
-
classResourceP(Protocol):
45
-
def__getitem__(self, key: Hashable, /) ->Any: ...
46
-
47
-
48
40
def_assert_guid(guid: str):
49
41
assertisinstance(guid, str), "Expected 'guid' to be a string"
50
42
assertlen(guid) >0, "Expected 'guid' to be non-empty"
51
43
52
44
53
-
# ContentItem Repository uses a PATCH method, not a PUT for updating.
0 commit comments