diff --git a/poetry.lock b/poetry.lock index e484bc10..07f5c30c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1973,13 +1973,13 @@ files = [ [[package]] name = "pyright" -version = "1.1.327" +version = "1.1.324" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" files = [ - {file = "pyright-1.1.327-py3-none-any.whl", hash = "sha256:3462cda239e9140276238bbdbd0b59d77406f1c2e14d8cb8c20c8e25639c6b3c"}, - {file = "pyright-1.1.327.tar.gz", hash = "sha256:ba74148ad64f22020dbbed6781c4bdb38ecb8a7ca90dc3c87a4f08d1c0e11592"}, + {file = "pyright-1.1.324-py3-none-any.whl", hash = "sha256:0edb712afbbad474e347de12ca1bd9368aa85d3365a1c7b795012e48e6a65111"}, + {file = "pyright-1.1.324.tar.gz", hash = "sha256:0c48e3bca3d081bba0dddd0c1f075aaa965c59bba691f7b9bd9d73a98e44e0cf"}, ] [package.dependencies] @@ -3082,4 +3082,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.12" -content-hash = "432a0ee0e3998c707ae8e5d84398fddb0983e68a7df16f34d57857517dc14b7a" +content-hash = "2fd82e0ea9553886be21bda05b63410350b52214564d2c2fb10c4d6f76e405d6" diff --git a/pyproject.toml b/pyproject.toml index 6883b534..d7128594 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ scipy = [ { version = ">=1.10.0", python = ">=3.9" } ] copier = ">=8.2.0" -jinja2-time = "^0.2.0" +jinja2-time = ">=0.2.0" [tool.poetry.group.dev.dependencies] black = "^23.1.0" @@ -82,7 +82,8 @@ pyparsing = "^3.0.9" # Version 1.1.312-1.1.315 have a false positive handling some nested function # calls pathvalidate = "^3.0.0" -pyright = ">=1.1.324" +# As of pyright==1.1.327 only 1.1.324 is bug free +pyright = "==1.1.324" ruff = "^0.0.285" [tool.poetry.scripts] @@ -94,7 +95,7 @@ build-backend = "poetry_dynamic_versioning.backend" [tool.poe.tasks] setup = "pre-commit install" -quality.shell = "isort snakebids && black snakebids && ruff snakebids && pyright" +quality.shell = "isort snakebids && black snakebids && ruff snakebids && pyright snakebids" fix.shell = "ruff --fix snakebids && isort snakebids && black snakebids" test = """ pytest --doctest-modules --ignore=docs \ diff --git a/snakebids/core/datasets.py b/snakebids/core/datasets.py index 1c910ed2..928aef62 100644 --- a/snakebids/core/datasets.py +++ b/snakebids/core/datasets.py @@ -69,7 +69,7 @@ def __repr__(self) -> str: return f'{self.__class__.__name__}({list(self._data)}, entity="{self.entity}")' @property - def entities(self) -> tuple[str]: + def entities(self) -> tuple[str, ...]: """The unique values associated with the component""" return tuple(set(self._data)) diff --git a/snakebids/tests/helpers.py b/snakebids/tests/helpers.py index ae2f83c5..ef13e988 100644 --- a/snakebids/tests/helpers.py +++ b/snakebids/tests/helpers.py @@ -269,11 +269,15 @@ def expand_zip_list( def needs_docker(container: str): def inner(func: _F) -> _F: - if sp.run(["docker"]).returncode != 0: + try: + sp.run(["docker"], check=True) + except sp.CalledProcessError: return pytest.mark.skip(reason="docker is not available on this machine")( func ) - if sp.run(["docker", "image", "inspect", container]).returncode != 0: + try: + sp.run(["docker", "image", "inspect", container], check=True) + except sp.CalledProcessError: return pytest.mark.skip(reason=f"{container} is not built on this machine")( func )