Skip to content

Commit 45b1ba5

Browse files
committed
Remove _config field from client, and expose types in init file throuhg shorter statement
1 parent de7885d commit 45b1ba5

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

src/onepassword/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
from .defaults import DEFAULT_INTEGRATION_NAME, DEFAULT_INTEGRATION_VERSION
33
from .secrets import Secrets
44
from .items import Items
5-
from .types import Item, ItemField, ItemSection
6-
5+
from .types import *
76

87

98
__all__ = [
109
"Client",
1110
"Secrets",
1211
"Items",
13-
"Item",
14-
"ItemField",
15-
"ItemSection",
1612
"DEFAULT_INTEGRATION_NAME",
1713
"DEFAULT_INTEGRATION_VERSION",
1814
]

src/onepassword/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ async def authenticate(self, auth, integration_name, integration_version):
2222

2323
authenticated_client.secrets = Secrets(client_id)
2424
authenticated_client.items = Items(client_id)
25-
authenticated_client._config = config
2625
authenticated_client._finalizer = weakref.finalize(self, _release_client, client_id)
2726

2827
return authenticated_client

src/onepassword/test_client.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,6 @@ async def test_invalid_resolve():
4040

4141
## test client constructor
4242

43-
44-
# valid
45-
@pytest.mark.asyncio
46-
async def test_good_client_construction():
47-
client = await onepassword.Client.authenticate(
48-
auth=TOKEN,
49-
integration_name=onepassword_defaults.DEFAULT_INTEGRATION_NAME,
50-
integration_version=onepassword_defaults.DEFAULT_INTEGRATION_VERSION,
51-
)
52-
assert client._config["serviceAccountToken"] == TOKEN
53-
assert (
54-
client._config["integrationName"]
55-
== onepassword_defaults.DEFAULT_INTEGRATION_NAME
56-
)
57-
assert (
58-
client._config["integrationVersion"]
59-
== onepassword_defaults.DEFAULT_INTEGRATION_VERSION
60-
)
61-
62-
6343
# invalid
6444
@pytest.mark.asyncio
6545
async def test_client_construction_no_auth():

0 commit comments

Comments
 (0)