Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jl-wynen committed Apr 19, 2024
1 parent b62b300 commit 0feff4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/scitacean/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,8 @@ def query_datasets(
self,
fields: dict[str, Any],
*,
limit: Optional[int] = None,
order: Optional[str] = None,
limit: int | None = None,
order: str | None = None,
strict_validation: bool = False,
) -> list[model.DownloadDataset]:
"""Query for datasets in SciCat.
Expand Down Expand Up @@ -783,7 +783,7 @@ def query_datasets(
)
params = {"fields": params_model(**fields).model_dump_json()}

limits: dict[str, Union[str, int]] = {}
limits: dict[str, str | int] = {}
if order is not None:
limits["order"] = order
if limit is not None:
Expand Down Expand Up @@ -1154,7 +1154,7 @@ def _call_endpoint(
url: str,
operation: str,
data: model.BaseModel | None = None,
params: Optional[dict[str, str]] = None,
params: dict[str, str] | None = None,
) -> Any:
full_url = _url_concat(self._base_url, url)
logger = get_logger()
Expand Down
5 changes: 1 addition & 4 deletions tests/client/query_client_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2024 SciCat Project (https://github.com/SciCatProject/scitacean)

from typing import Union

import pytest
from dateutil.parser import parse as parse_datetime
Expand All @@ -10,9 +9,7 @@
from scitacean.testing.backend import skip_if_not_backend
from scitacean.testing.backend.config import SciCatAccess

UPLOAD_DATASETS: dict[
str, Union[model.UploadDerivedDataset, model.UploadRawDataset]
] = {
UPLOAD_DATASETS: dict[str, model.UploadDerivedDataset | model.UploadRawDataset] = {
"raw1": model.UploadRawDataset(
ownerGroup="PLACEHOLDER",
accessGroups=["uu", "faculty"],
Expand Down

0 comments on commit 0feff4d

Please sign in to comment.