diff --git a/pyproject.toml b/pyproject.toml index e13eae5705d..992bc56e5bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,7 +78,7 @@ loop = ["qcodes_loop>=0.1.2"] test = [ "coverage[toml]>=6.0.0", "deepdiff>=5.0.2", - "hypothesis>=5.49.0", + "hypothesis>=6.85.0", "lxml>=4.6.0", "lxml-stubs>=0.4.0", "mypy>=0.971", diff --git a/qcodes/dataset/sqlite/queries.py b/qcodes/dataset/sqlite/queries.py index 68c192c000d..4c858f215eb 100644 --- a/qcodes/dataset/sqlite/queries.py +++ b/qcodes/dataset/sqlite/queries.py @@ -11,7 +11,7 @@ import warnings from collections.abc import Callable, Iterable, Mapping, Sequence from itertools import zip_longest -from typing import Any, cast +from typing import Any, Literal, cast import numpy as np import numpy.typing as npt @@ -52,7 +52,17 @@ log = logging.getLogger(__name__) -_unicode_categories = ('Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nd', 'Pc', 'Pd', 'Zs') +_unicode_categories: tuple[ + Literal["Lu"], + Literal["Ll"], + Literal["Lt"], + Literal["Lm"], + Literal["Lo"], + Literal["Nd"], + Literal["Pc"], + Literal["Pd"], + Literal["Zs"], +] = ("Lu", "Ll", "Lt", "Lm", "Lo", "Nd", "Pc", "Pd", "Zs") # in the current version, these are the standard columns of the "runs" table diff --git a/qcodes/tests/dataset/test_dataset_basic.py b/qcodes/tests/dataset/test_dataset_basic.py index 62ecb2fff99..8ab6fdf5dba 100644 --- a/qcodes/tests/dataset/test_dataset_basic.py +++ b/qcodes/tests/dataset/test_dataset_basic.py @@ -276,10 +276,14 @@ def test_load_by_id_for_none() -> None: @settings(deadline=None, max_examples=6) -@given(experiment_name=hst.text(min_size=1), - sample_name=hst.text(min_size=1), - dataset_name=hst.text(hst.characters(whitelist_categories=_unicode_categories), - min_size=1)) +@given( + experiment_name=hst.text(min_size=1), + sample_name=hst.text(min_size=1), + dataset_name=hst.text( + hst.characters(categories=_unicode_categories), # type: ignore[arg-type] + min_size=1, + ), +) @pytest.mark.usefixtures("empty_temp_db") @pytest.mark.usefixtures("reset_config_on_exit") def test_add_experiments(experiment_name, sample_name, dataset_name) -> None: diff --git a/requirements.txt b/requirements.txt index 4c8ea0f30d6..64f8ce4112f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,7 +45,7 @@ google-auth~=2.23.0 googleapis-common-protos~=1.60.0 h5netcdf~=1.2.0 h5py~=3.9.0 -hypothesis~=6.84.0 +hypothesis~=6.86.2 idna==3.4 imagesize~=1.4.1 importlib-metadata~=6.8.0