diff --git a/miniscope_io/models/pipeline.py b/miniscope_io/models/pipeline.py index 90671e6..585fdbd 100644 --- a/miniscope_io/models/pipeline.py +++ b/miniscope_io/models/pipeline.py @@ -2,14 +2,20 @@ Base ABCs for pipeline classes """ +import sys from abc import abstractmethod -from typing import ClassVar, Final, Generic, Self, TypeVar, Union, final +from typing import ClassVar, Final, Generic, TypeVar, Union, final from pydantic import Field from miniscope_io.exceptions import ConfigurationMismatchError from miniscope_io.models.models import MiniscopeConfig, PipelineModel +if sys.version_info < (3, 11): + from typing_extensions import Self +else: + from typing import Self + T = TypeVar("T") """ Input Type typevar diff --git a/pdm.lock b/pdm.lock index e08a0b6..37b10e8 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "all", "dev", "docs", "plot", "tests"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:a090620ba52a1d2d377e7126f7c6bb98207af0ca2de9354c8bfd58828d4c745d" +content_hash = "sha256:cda0e212515e3067b27276916a7033214752eadea01b3513953b8dca9e20cbc9" [[metadata.targets]] requires_python = "~=3.9" diff --git a/pyproject.toml b/pyproject.toml index 34e14b3..a045c4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ dependencies = [ "rich>=13.6.0", "pyyaml>=6.0.1", "click>=8.1.7", + "typing-extensions>=4.12.2; python_version<'3.11'", ] readme = "README.md" @@ -119,7 +120,7 @@ omit = [ ] [tool.ruff] -target-version = "py311" +target-version = "py39" include = ["miniscope_io/**/*.py", "pyproject.toml"] exclude = ["docs", "tests", "miniscope_io/vendor", "noxfile.py"] line-length = 100