Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Removes pre-commit action in favor of manual version (#591)

Stefan Krawczyk3e58c5804d76
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
index ac9eac44..e1f18de7 100644
--- a/.github/workflows/python-package.yml
+++ b/.github/workflows/python-package.yml
@@ -35,7 +35,17 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- - uses: pre-commit/[email protected]
+ with:
+ python-version: '3.12'
+ - name: Cache pre-commit environments
+ uses: actions/cache@v3
+ with:
+ path: ~/.cache/pre-commit
+ key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
+ - name: Install pre-commit
+ run: pip install pre-commit
+ - name: Run pre-commit hooks
+ run: pre-commit run --all-files
test:
runs-on: ubuntu-latest
diff --git a/DISCLAIMER b/DISCLAIMER
index 02fefb02..d9174712 100644
--- a/DISCLAIMER
+++ b/DISCLAIMER
@@ -8,4 +8,3 @@ have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness
or stability of the code, it does indicate that the project has yet to be
fully endorsed by the ASF.
-
diff --git a/NOTICE b/NOTICE
index 23a97583..0a81403e 100644
--- a/NOTICE
+++ b/NOTICE
@@ -3,4 +3,3 @@ Copyright 2025 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/burr/core/state.py b/burr/core/state.py
index d82e6f4b..87312daa 100644
--- a/burr/core/state.py
+++ b/burr/core/state.py
@@ -22,18 +22,7 @@ import importlib
import inspect
import logging
from functools import cached_property
-from typing import (
- Any,
- Callable,
- Dict,
- Generic,
- Iterator,
- List,
- Mapping,
- Optional,
- TypeVar,
- Union,
-)
+from typing import Any, Callable, Dict, Generic, Iterator, Mapping, Optional, TypeVar, Union
from burr.core import serde
from burr.core.typing import DictBasedTypingSystem, TypingSystem
@@ -473,7 +462,7 @@ class State(Mapping, Generic[StateType]):
def keys(self):
"""Returns a list of the state keys only (without values for cleaner display).
-
+
Returns:
list: A list of state keys
"""
diff --git a/tests/core/test_state.py b/tests/core/test_state.py
index 1c19b857..c31a32ea 100644
--- a/tests/core/test_state.py
+++ b/tests/core/test_state.py
@@ -232,11 +232,11 @@ def test_state_keys_returns_list():
"""Test that State.keys() returns a list (fixes #409)"""
state = State({"a": 1, "b": 2, "c": 3})
keys = state.keys()
-
+
# Should return a list with the correct keys
assert isinstance(keys, list)
assert keys == ["a", "b", "c"]
-
+
# Test with empty state
empty_state = State()
assert empty_state.keys() == []
diff --git a/tests/integrations/serde/test_langchain.py b/tests/integrations/serde/test_langchain.py
index 2b3e1f53..ea406b4c 100644
--- a/tests/integrations/serde/test_langchain.py
+++ b/tests/integrations/serde/test_langchain.py
@@ -14,7 +14,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+import sys
+import pytest
from langchain_community.document_transformers.embeddings_redundant_filter import _DocumentWithState
from langchain_core import documents as lc_documents
from langchain_core import messages as lc_messages
@@ -41,6 +43,7 @@ def test_serde_of_lc_document():
assert serde.KEY not in ng
[email protected](sys.version_info < (3, 10), reason="requires python3.10 or higher")
def test_serde_of_lc_message():
message = lc_messages.HumanMessage(content="test content")
og = state.State({"message": message})
@@ -51,7 +54,6 @@ def test_serde_of_lc_message():
"data": {
"additional_kwargs": {},
"content": "test content",
- "example": False,
"id": None,
"name": None,
"response_metadata": {},