Skip to content

Commit

Permalink
fix: correct type signatures according to pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Aug 27, 2024
1 parent 9502c1a commit 8b3a929
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/posit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

from . import connect # noqa

__all__ = "connect"
__all__ = [
"connect"
]
5 changes: 0 additions & 5 deletions src/posit/connect/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ def __init__(self, url: str, api_key: str) -> None:
"""
...

@overload
def __init__(self, *args, **kwargs) -> None:
"""Initialize a Client instance."""
...

def __init__(self, *args, **kwargs) -> None:
"""Initialize a Client instance.
Expand Down
1 change: 0 additions & 1 deletion src/posit/connect/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ def find_one(self, **kwargs) -> Group | None:
-------
Group | None
"""
dict
path = "v1/groups"
url = self.url + path
paginator = Paginator(self.session, url, params=kwargs)
Expand Down
3 changes: 3 additions & 0 deletions src/posit/connect/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def __init__(self, params: ResourceParameters, **kwargs):
def __setattr__(self, name: str, value: Any) -> None:
raise AttributeError("cannot set attributes: use update() instead")

def update(self, *args, **kwargs):
super().update(*args, **kwargs)


class Resources(ABC):
def __init__(self, params: ResourceParameters) -> None:
Expand Down
3 changes: 2 additions & 1 deletion src/posit/connect/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def __init__(self, params: ResourceParameters) -> None:
@overload
def find(
self,
*,
prefix: str = ...,
user_role: str = ...,
account_status: str = ...,
Expand All @@ -193,7 +194,7 @@ def find(
@overload
def find(self, **kwargs) -> List[User]: ...

def find(self, **kwargs):
def find(self, **kwargs) -> List[User]:
url = self.params.url + "v1/users"
paginator = Paginator(self.session, url, params=kwargs)
results = paginator.fetch_results()
Expand Down

0 comments on commit 8b3a929

Please sign in to comment.