|
1 | 1 | import os
|
2 | 2 | import shlex
|
3 |
| -from typing import List, Dict, Optional |
| 3 | +from typing import List, Dict, Optional, TYPE_CHECKING |
4 | 4 | import httpx
|
5 |
| -from onepasswordconnectsdk.client import Client |
| 5 | + |
| 6 | +if TYPE_CHECKING: |
| 7 | + from onepasswordconnectsdk.client import Client |
6 | 8 | from onepasswordconnectsdk.models import (
|
7 | 9 | Item,
|
8 | 10 | ParsedField,
|
@@ -55,7 +57,7 @@ def get_client_args(self, base_url: str, headers: Dict[str, str], timeout: float
|
55 | 57 | return args
|
56 | 58 |
|
57 | 59 |
|
58 |
| -def load_dict(client: Client, config: dict): |
| 60 | +def load_dict(client: "Client", config: dict): |
59 | 61 | """Load: Takes a dictionary with keys specifiying the user
|
60 | 62 | desired naming scheme of the values to return. Each key's
|
61 | 63 | value is a dictionary that includes information on where
|
@@ -122,7 +124,7 @@ def load_dict(client: Client, config: dict):
|
122 | 124 | return config_values
|
123 | 125 |
|
124 | 126 |
|
125 |
| -def load(client: Client, config: object): |
| 127 | +def load(client: "Client", config: object): |
126 | 128 | """Load: Takes a an object with class attributes annotated with tags
|
127 | 129 | describing where to find desired fields in 1Password. Manipulates given object
|
128 | 130 | and fills attributes in with 1Password item field values.
|
@@ -201,7 +203,7 @@ def _vault_uuid_for_field(field: str, vault_tag: dict):
|
201 | 203 |
|
202 | 204 |
|
203 | 205 | def _set_values_for_item(
|
204 |
| - client: Client, |
| 206 | + client: "Client", |
205 | 207 | parsed_item: ParsedItem,
|
206 | 208 | config_dict={},
|
207 | 209 | config_object: object = None,
|
|
0 commit comments