Skip to content

Commit 8779b24

Browse files
committed
Revert type class name changes; UpdateUser, CreateUser, FindUser
1 parent 6651301 commit 8779b24

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/posit/connect/users.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def unlock(self):
8282
self.params.session.post(url, json=body)
8383
super().update(locked=False)
8484

85-
class _UpdateUser(TypedDict):
85+
class UpdateUser(TypedDict):
8686
"""Update user request."""
8787

8888
email: NotRequired[str]
@@ -93,7 +93,7 @@ class _UpdateUser(TypedDict):
9393

9494
def update(
9595
self,
96-
**kwargs: Unpack[_UpdateUser],
96+
**kwargs: Unpack[UpdateUser],
9797
) -> None:
9898
"""
9999
Update the user's attributes.
@@ -189,7 +189,7 @@ def __init__(self, ctx: Context) -> None:
189189
super().__init__(ctx.client.resource_params)
190190
self._ctx: Context = ctx
191191

192-
class _CreateUser(TypedDict):
192+
class CreateUser(TypedDict):
193193
"""Create user request."""
194194

195195
username: Required[str]
@@ -204,7 +204,7 @@ class _CreateUser(TypedDict):
204204
user_role: NotRequired[Literal["administrator", "publisher", "viewer"]]
205205
unique_id: NotRequired[str]
206206

207-
def create(self, **attributes: Unpack[_CreateUser]) -> User:
207+
def create(self, **attributes: Unpack[CreateUser]) -> User:
208208
"""
209209
Create a new user with the specified attributes.
210210
@@ -263,14 +263,14 @@ def create(self, **attributes: Unpack[_CreateUser]) -> User:
263263
response = self.params.session.post(url, json=attributes)
264264
return User(self._ctx, **response.json())
265265

266-
class _FindUser(TypedDict):
266+
class FindUser(TypedDict):
267267
"""Find user request."""
268268

269269
prefix: NotRequired[str]
270270
user_role: NotRequired[Literal["administrator", "publisher", "viewer"] | str]
271271
account_status: NotRequired[Literal["locked", "licensed", "inactive"] | str]
272272

273-
def find(self, **conditions: Unpack[_FindUser]) -> List[User]:
273+
def find(self, **conditions: Unpack[FindUser]) -> List[User]:
274274
"""
275275
Find users matching the specified conditions.
276276
@@ -313,7 +313,7 @@ def find(self, **conditions: Unpack[_FindUser]) -> List[User]:
313313
for user in results
314314
]
315315

316-
def find_one(self, **conditions: Unpack[_FindUser]) -> User | None:
316+
def find_one(self, **conditions: Unpack[FindUser]) -> User | None:
317317
"""
318318
Find a user matching the specified conditions.
319319

0 commit comments

Comments
 (0)