Skip to content

Commit 4d03bea

Browse files
committed
rewrite git url + fix format
1 parent 59d2d4a commit 4d03bea

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
with:
1414
python-version: "3.13"
1515
- uses: pypa/hatch@install
16+
- name: setup git url rewrite
17+
run: git config --global url."https://${{ secrets.GH_USERNAME }}:${{ secrets.CLEANLAB_BOT_PAT }}@github.com".insteadOf ssh://[email protected]
1618
- run: hatch run types:check
1719
fmt:
1820
name: Format and lint

src/cleanlab_codex/utils/llamaindex.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
from llama_index.core.bridge.pydantic import BaseModel, FieldInfo, create_model
77

88

9-
def get_function_schema(
10-
name: str, func: Callable[..., Any], tool_properties: dict[str, Any]
11-
) -> type[BaseModel]:
9+
def get_function_schema(name: str, func: Callable[..., Any], tool_properties: dict[str, Any]) -> type[BaseModel]:
1210
fields = {}
1311
params = signature(func).parameters
1412
for param_name in params:

tests/test_codex.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@
1111

1212
@pytest.fixture
1313
def mock_client() -> Generator[_Codex, None, None]:
14-
with patch(
15-
"cleanlab_codex.codex.init_codex_client", return_value=MagicMock()
16-
) as mock:
14+
with patch("cleanlab_codex.codex.init_codex_client", return_value=MagicMock()) as mock:
1715
yield mock
1816

1917

2018
def test_query_read_only(mock_client: _Codex):
2119
mock_client.projects.entries.query.return_value = None # type: ignore
2220
codex = Codex("")
23-
res = codex.query(
24-
"What is the capital of France?", read_only=True, project_id=fake_project_id
25-
)
21+
res = codex.query("What is the capital of France?", read_only=True, project_id=fake_project_id)
2622
mock_client.projects.entries.query.assert_called_once_with( # type: ignore
2723
fake_project_id, "What is the capital of France?"
2824
)

0 commit comments

Comments
 (0)