Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ version = "0"
authors = ["Corridor Platforms <postmaster@corridorplatforms.com>"]
license = "Apache-2.0, BSD-3-Clause"
readme = "docs/README.md"
packages = [{include = "sqlalchemy_history"}]
packages = [{ include = "sqlalchemy_history" }]
repository = "https://github.com/corridor/sqlalchemy-history"
classifiers=[
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
Expand All @@ -24,7 +24,6 @@ python = "^3.9"

SQLAlchemy = ">=2"
SQLAlchemy-Utils = ">=0.30.12"
cached-property = "*"

[tool.poetry.group.dev.dependencies]
ruff = "*"
Expand Down
9 changes: 4 additions & 5 deletions sqlalchemy_history/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sqlalchemy as sa
from cached_property import cached_property

import functools
from sqlalchemy_history.reverter import Reverter
from sqlalchemy_history.utils import (
get_versioning_manager,
Expand All @@ -10,7 +9,7 @@


class VersionClassBase(object):
@cached_property
@functools.cached_property
def previous(self):
"""Returns the previous version relative to this version in the version
history. If current version is the first version this method returns
Expand All @@ -20,7 +19,7 @@ def previous(self):
"""
return get_versioning_manager(self).fetcher(parent_class(self.__class__)).previous(self)

@cached_property
@functools.cached_property
def next(self):
"""Returns the next version relative to this version in the version
history. If current version is the last version this method returns
Expand All @@ -30,7 +29,7 @@ def next(self):
"""
return get_versioning_manager(self).fetcher(parent_class(self.__class__)).next(self)

@cached_property
@functools.cached_property
def index(self):
""" """
return get_versioning_manager(self).fetcher(parent_class(self.__class__)).index(self)
Expand Down