Skip to content

Commit 992acaa

Browse files
authored
fix(python): update internal type annotations (#2400)
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Update type annotations and remove trailing spaces in `baml_py.pyi`. > > - **Type Annotations**: > - Add `runtime: BamlRuntime` parameter to `cast_to()` in `FunctionResult` class in `baml_py.pyi`. > - **Whitespace**: > - Remove trailing spaces in `AbortController` methods `__init__()`, `abort()`, and `aborted()` in `baml_py.pyi`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for ae99b69. You can [customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this summary. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
1 parent 75b257e commit 992acaa

File tree

1 file changed

+4
-4
lines changed
  • engine/language_client_python/python_src/baml_py

1 file changed

+4
-4
lines changed

engine/language_client_python/python_src/baml_py/baml_py.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def set_log_max_chunk_length(length: int) -> None:
2929
class AbortController:
3030
"""Controller for cancelling BAML operations."""
3131

32-
def __init__(self, timeout_ms: Optional[int] = None) -> None:
32+
def __init__(self, timeout_ms: Optional[int] = None) -> None:
3333
"""
3434
Creates a new abort controller with an optional timeout in milliseconds.
3535
Once aborted, the AbortController will forever remain in an an aborted state.
@@ -39,16 +39,15 @@ class AbortController:
3939
timeout_ms: The timeout in milliseconds. If not provided, AbortController will not timeout.
4040
"""
4141
...
42-
4342

44-
def abort(self) -> None:
43+
def abort(self) -> None:
4544
"""
4645
Immediately abort all operations.
4746
"""
4847
...
4948

5049
@property
51-
def aborted(self) -> bool:
50+
def aborted(self) -> bool:
5251
"""
5352
Check the state of this controller.
5453
Once aborted, the AbortController will forever remain in an an aborted state.
@@ -78,6 +77,7 @@ class FunctionResult:
7877
class_module: Any,
7978
partial_class_module: Any,
8079
allow_partials: bool,
80+
runtime: BamlRuntime,
8181
) -> Any: ...
8282

8383
# This is a debug function that returns the internal representation of the response

0 commit comments

Comments
 (0)