Skip to content

Commit

Permalink
Update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Aug 16, 2024
1 parent 8e93b9e commit 2d1ddd8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: check-json
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
rev: v0.6.0
hooks:
- id: ruff
files: holonote/
Expand Down
22 changes: 11 additions & 11 deletions holonote/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def pytest_collection_modifyitems(config, items):
items[:] = selected


@pytest.fixture()
@pytest.fixture
def conn_sqlite_uuid(tmp_path) -> Iterator[SQLiteDB]:
conn = SQLiteDB(filename=str(tmp_path / "test.db"), primary_key=UUIDHexStringKey())
yield conn
Expand All @@ -55,7 +55,7 @@ def conn_sqlite_uuid(tmp_path) -> Iterator[SQLiteDB]:
conn.con.close()


@pytest.fixture()
@pytest.fixture
def annotator_range1d(conn_sqlite_uuid) -> Annotator:
anno = Annotator(
{"TIME": np.datetime64},
Expand All @@ -65,7 +65,7 @@ def annotator_range1d(conn_sqlite_uuid) -> Annotator:
return anno


@pytest.fixture()
@pytest.fixture
def annotator_point1d(conn_sqlite_uuid) -> Annotator:
anno = Annotator(
{"TIME": (np.datetime64, "point")},
Expand All @@ -75,7 +75,7 @@ def annotator_point1d(conn_sqlite_uuid) -> Annotator:
return anno


@pytest.fixture()
@pytest.fixture
def annotator_range2d(conn_sqlite_uuid) -> Annotator:
anno = Annotator(
{"x": float, "y": float},
Expand All @@ -85,7 +85,7 @@ def annotator_range2d(conn_sqlite_uuid) -> Annotator:
return anno


@pytest.fixture()
@pytest.fixture
def annotator_point2d(conn_sqlite_uuid) -> Annotator:
anno = Annotator(
{"x": (float, "point"), "y": (float, "point")},
Expand All @@ -95,7 +95,7 @@ def annotator_point2d(conn_sqlite_uuid) -> Annotator:
return anno


@pytest.fixture()
@pytest.fixture
def multiple_region_annotator(conn_sqlite_uuid) -> Annotator:
return Annotator(
{"TIME": np.datetime64},
Expand All @@ -105,7 +105,7 @@ def multiple_region_annotator(conn_sqlite_uuid) -> Annotator:
)


@pytest.fixture()
@pytest.fixture
def multiple_annotators(conn_sqlite_uuid) -> Annotator:
return Annotator(
{"TIME": np.datetime64, "x": float, "y": float},
Expand All @@ -114,7 +114,7 @@ def multiple_annotators(conn_sqlite_uuid) -> Annotator:
)


@pytest.fixture()
@pytest.fixture
def multiple_fields_annotator(conn_sqlite_uuid) -> Annotator:
conn_sqlite_uuid.fields = ["field1", "field2"]
anno = Annotator(
Expand All @@ -125,20 +125,20 @@ def multiple_fields_annotator(conn_sqlite_uuid) -> Annotator:
return anno


@pytest.fixture()
@pytest.fixture
def element_range1d() -> hv.Curve:
time = pd.date_range("2020-01-01", "2020-01-10", freq="D").to_numpy()
return hv.Curve(time, kdims=["TIME"])


@pytest.fixture()
@pytest.fixture
def element_range2d() -> hv.Image:
x = np.arange(10)
xy = x[:, np.newaxis] * x
return hv.Image(xy, kdims=["x", "y"])


@pytest.fixture()
@pytest.fixture
def cat_annotator(conn_sqlite_uuid) -> Annotator:
# Initialize annotator
annotator = Annotator(
Expand Down

0 comments on commit 2d1ddd8

Please sign in to comment.