Skip to content

Commit 5758adf

Browse files
fix: Remove unused import, fix mock_cache fixture for 2.0 settings
- Remove unused `from typing import Callable` in connection.py (lint failure) - Update mock_cache fixture: `cache` → `download_path` (KeyError in test_attach) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 042dbf2 commit 5758adf

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/datajoint/connection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import re
1212
import warnings
1313
from contextlib import contextmanager
14-
from typing import Callable
1514

1615
from . import errors
1716
from .adapters import get_adapter

tests/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,13 @@ def mock_stores(stores_config):
536536

537537
@pytest.fixture
538538
def mock_cache(tmpdir_factory):
539-
og_cache = dj.config.get("cache")
540-
dj.config["cache"] = tmpdir_factory.mktemp("cache")
539+
og_cache = dj.config.get("download_path")
540+
dj.config["download_path"] = str(tmpdir_factory.mktemp("cache"))
541541
yield
542542
if og_cache is None:
543-
del dj.config["cache"]
543+
del dj.config["download_path"]
544544
else:
545-
dj.config["cache"] = og_cache
545+
dj.config["download_path"] = og_cache
546546

547547

548548
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)