Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/onepassword/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"Items",
"Vaults",
"Groups",
"DesktopAuth",
"DEFAULT_INTEGRATION_NAME",
"DEFAULT_INTEGRATION_VERSION",
"DesktopAuth",
]

for name, obj in inspect.getmembers(sys.modules["onepassword.types"]):
Expand All @@ -33,7 +33,7 @@
and inspect.getmodule(obj) == sys.modules["onepassword.types"]
)
or isinstance(obj, int)
or type(obj) == typing._LiteralGenericAlias

Check failure on line 36 in src/onepassword/__init__.py

View workflow job for this annotation

GitHub Actions / Lint

Ruff (E721)

src/onepassword/__init__.py:36:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks

Check failure on line 36 in src/onepassword/__init__.py

View workflow job for this annotation

GitHub Actions / Lint

Ruff (E721)

src/onepassword/__init__.py:36:12: E721 Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
):
__all__.append(name)

Expand Down
1 change: 0 additions & 1 deletion src/onepassword/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ async def authenticate(
authenticated_client.items = Items(inner_client)
authenticated_client.vaults = Vaults(inner_client)
authenticated_client.groups = Groups(inner_client)

authenticated_client._finalizer = weakref.finalize(
cls, core.release_client, client_id
)
Expand Down
3 changes: 3 additions & 0 deletions src/onepassword/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def __init__(self, inner_client: InnerClient):
self.inner_client = inner_client

async def get(self, group_id: str, group_params: GroupGetParams) -> Group:
"""
Get a group by its ID and parameters.
"""
response = await self.inner_client.invoke(
{
"invocation": {
Expand Down
2 changes: 1 addition & 1 deletion src/onepassword/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

async def get(self, vault_id: str, item_id: str) -> Item:
"""
Get an item by vault and item ID
Get an item by vault and item ID.
"""
response = await self.inner_client.invoke(
{
Expand Down Expand Up @@ -130,7 +130,7 @@
"""
Delete an item.
"""
response = await self.inner_client.invoke(

Check failure on line 133 in src/onepassword/items.py

View workflow job for this annotation

GitHub Actions / Lint

Ruff (F841)

src/onepassword/items.py:133:9: F841 Local variable `response` is assigned to but never used

Check failure on line 133 in src/onepassword/items.py

View workflow job for this annotation

GitHub Actions / Lint

Ruff (F841)

src/onepassword/items.py:133:9: F841 Local variable `response` is assigned to but never used
{
"invocation": {
"clientId": self.inner_client.client_id,
Expand Down Expand Up @@ -169,7 +169,7 @@
"""
Archive an item.
"""
response = await self.inner_client.invoke(

Check failure on line 172 in src/onepassword/items.py

View workflow job for this annotation

GitHub Actions / Lint

Ruff (F841)

src/onepassword/items.py:172:9: F841 Local variable `response` is assigned to but never used

Check failure on line 172 in src/onepassword/items.py

View workflow job for this annotation

GitHub Actions / Lint

Ruff (F841)

src/onepassword/items.py:172:9: F841 Local variable `response` is assigned to but never used
{
"invocation": {
"clientId": self.inner_client.client_id,
Expand Down
8 changes: 4 additions & 4 deletions src/onepassword/items_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self, inner_client: InnerClient):

async def attach(self, item: Item, file_params: FileCreateParams) -> Item:
"""
Attach files to Items
Attach files to Items.
"""
response = await self.inner_client.invoke(
{
Expand All @@ -34,7 +34,7 @@ async def attach(self, item: Item, file_params: FileCreateParams) -> Item:

async def read(self, vault_id: str, item_id: str, attr: FileAttributes) -> bytes:
"""
Read file content from the Item
Read file content from the Item.
"""
response = await self.inner_client.invoke(
{
Expand All @@ -57,7 +57,7 @@ async def read(self, vault_id: str, item_id: str, attr: FileAttributes) -> bytes

async def delete(self, item: Item, section_id: str, field_id: str) -> Item:
"""
Delete a field file from Item using the section and field IDs
Delete a field file from Item using the section and field IDs.
"""
response = await self.inner_client.invoke(
{
Expand All @@ -82,7 +82,7 @@ async def replace_document(
self, item: Item, doc_params: DocumentCreateParams
) -> Item:
"""
Replace the document file within a document item
Replace the document file within a document item.
"""
response = await self.inner_client.invoke(
{
Expand Down
Loading
Loading