Skip to content

Commit

Permalink
Use Self type instead of quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegat01 committed Oct 11, 2023
1 parent 17ff08c commit 08c6749
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions supervisor/store/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from copy import deepcopy
import logging

from supervisor.coresys import CoreSys
from typing import Self

from ..addons.model import AddonModel, Data
from ..coresys import CoreSys

_LOGGER: logging.Logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -37,6 +37,6 @@ def is_detached(self) -> bool:
"""Return True if add-on is detached."""
return False

def clone(self) -> "AddonStore":
def clone(self) -> Self:
"""Return a copy that includes data and does not use global store data."""
return AddonStore(self.coresys, self.slug, deepcopy(self.data))
return type(self)(self.coresys, self.slug, deepcopy(self.data))

0 comments on commit 08c6749

Please sign in to comment.