|
9 | 9 | import yaml |
10 | 10 | from pydantic.v1 import PrivateAttr |
11 | 11 |
|
12 | | -from osw.custom_types import FilePath |
| 12 | +from osw.custom_types import PossibleFilePath |
13 | 13 | from osw.model.static import OswBaseModel |
14 | 14 |
|
15 | 15 | CREDENTIALS_FN_DEFAULT = "credentials.pwd.yaml" |
|
18 | 18 | class CredentialManager(OswBaseModel): |
19 | 19 | """Handles credentials""" |
20 | 20 |
|
21 | | - cred_filepath: Optional[Union[Union[str, FilePath], List[Union[str, FilePath]]]] |
| 21 | + cred_filepath: Optional[ |
| 22 | + Union[Union[str, PossibleFilePath], List[Union[str, PossibleFilePath]]] |
| 23 | + ] |
22 | 24 | """Filepath to yaml file with credentials for osw and connected services""" |
23 | | - cert_filepath: Optional[Union[Union[str, FilePath], List[Union[str, FilePath]]]] |
| 25 | + cert_filepath: Optional[ |
| 26 | + Union[Union[str, PossibleFilePath], List[Union[str, PossibleFilePath]]] |
| 27 | + ] |
24 | 28 | """Filepath to the certificates for osw and connected services""" |
25 | 29 |
|
26 | 30 | _credentials: List[BaseCredential] = PrivateAttr([]) |
@@ -234,7 +238,7 @@ def iri_in_file(self, iri: str) -> bool: |
234 | 238 |
|
235 | 239 | def save_credentials_to_file( |
236 | 240 | self, |
237 | | - filepath: Union[str, FilePath] = None, |
| 241 | + filepath: Union[str, PossibleFilePath] = None, |
238 | 242 | set_cred_filepath: bool = False, |
239 | 243 | ): |
240 | 244 | """Saves the in memory credentials to a file |
|
0 commit comments