Skip to content

Commit adf81d0

Browse files
SDK regeneration (#54)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 6b2fe76 commit adf81d0

File tree

16 files changed

+65
-37
lines changed

16 files changed

+65
-37
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "credal"
33

44
[tool.poetry]
55
name = "credal"
6-
version = "0.1.6"
6+
version = "0.1.7"
77
description = ""
88
readme = "README.md"
99
authors = []

src/credal/__init__.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@
167167
"UserMetadataPatch": ".users",
168168
"WebSearchResult": ".copilots",
169169
"__version__": ".version",
170-
"common": ".",
171-
"copilots": ".",
172-
"document_catalog": ".",
173-
"document_collections": ".",
174-
"search": ".",
175-
"users": ".",
170+
"common": ".common",
171+
"copilots": ".copilots",
172+
"document_catalog": ".document_catalog",
173+
"document_collections": ".document_collections",
174+
"search": ".search",
175+
"users": ".users",
176176
}
177177

178178

@@ -182,8 +182,10 @@ def __getattr__(attr_name: str) -> typing.Any:
182182
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
183183
try:
184184
module = import_module(module_name, __package__)
185-
result = getattr(module, attr_name)
186-
return result
185+
if module_name == f".{attr_name}":
186+
return module
187+
else:
188+
return getattr(module, attr_name)
187189
except ImportError as e:
188190
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
189191
except AttributeError as e:

src/credal/common/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ def __getattr__(attr_name: str) -> typing.Any:
3838
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
3939
try:
4040
module = import_module(module_name, __package__)
41-
result = getattr(module, attr_name)
42-
return result
41+
if module_name == f".{attr_name}":
42+
return module
43+
else:
44+
return getattr(module, attr_name)
4345
except ImportError as e:
4446
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
4547
except AttributeError as e:

src/credal/common/types/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ def __getattr__(attr_name: str) -> typing.Any:
3434
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
3535
try:
3636
module = import_module(module_name, __package__)
37-
result = getattr(module, attr_name)
38-
return result
37+
if module_name == f".{attr_name}":
38+
return module
39+
else:
40+
return getattr(module, attr_name)
3941
except ImportError as e:
4042
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
4143
except AttributeError as e:

src/credal/copilots/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ def __getattr__(attr_name: str) -> typing.Any:
106106
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
107107
try:
108108
module = import_module(module_name, __package__)
109-
result = getattr(module, attr_name)
110-
return result
109+
if module_name == f".{attr_name}":
110+
return module
111+
else:
112+
return getattr(module, attr_name)
111113
except ImportError as e:
112114
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
113115
except AttributeError as e:

src/credal/copilots/types/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ def __getattr__(attr_name: str) -> typing.Any:
104104
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
105105
try:
106106
module = import_module(module_name, __package__)
107-
result = getattr(module, attr_name)
108-
return result
107+
if module_name == f".{attr_name}":
108+
return module
109+
else:
110+
return getattr(module, attr_name)
109111
except ImportError as e:
110112
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
111113
except AttributeError as e:

src/credal/core/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ def __getattr__(attr_name: str) -> typing.Any:
6161
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
6262
try:
6363
module = import_module(module_name, __package__)
64-
result = getattr(module, attr_name)
65-
return result
64+
if module_name == f".{attr_name}":
65+
return module
66+
else:
67+
return getattr(module, attr_name)
6668
except ImportError as e:
6769
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
6870
except AttributeError as e:

src/credal/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def __init__(
2222

2323
def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
25-
"User-Agent": "credal/0.1.6",
25+
"User-Agent": "credal/0.1.7",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "credal",
28-
"X-Fern-SDK-Version": "0.1.6",
28+
"X-Fern-SDK-Version": "0.1.7",
2929
**(self.get_custom_headers() or {}),
3030
}
3131
headers["Authorization"] = f"Bearer {self._get_api_key()}"

src/credal/document_catalog/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ def __getattr__(attr_name: str) -> typing.Any:
2828
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
2929
try:
3030
module = import_module(module_name, __package__)
31-
result = getattr(module, attr_name)
32-
return result
31+
if module_name == f".{attr_name}":
32+
return module
33+
else:
34+
return getattr(module, attr_name)
3335
except ImportError as e:
3436
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
3537
except AttributeError as e:

src/credal/document_catalog/types/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def __getattr__(attr_name: str) -> typing.Any:
2626
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
2727
try:
2828
module = import_module(module_name, __package__)
29-
result = getattr(module, attr_name)
30-
return result
29+
if module_name == f".{attr_name}":
30+
return module
31+
else:
32+
return getattr(module, attr_name)
3133
except ImportError as e:
3234
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
3335
except AttributeError as e:

0 commit comments

Comments
 (0)