Skip to content

Commit

Permalink
Refactor: abstractproperty (#497)
Browse files Browse the repository at this point in the history
Signed-off-by: h-suzuki-isp <[email protected]>
  • Loading branch information
h-suzuki-isp authored Apr 22, 2024
1 parent 4511ac7 commit a10d28e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/caret_analyze/common/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from __future__ import annotations

from abc import ABCMeta, abstractproperty
from abc import ABCMeta, abstractmethod
from collections import UserDict
from typing import Any

Expand Down Expand Up @@ -80,7 +80,8 @@ def _convert_safe(obj: Any) -> list | dict:
class Summarizable(metaclass=ABCMeta):
"""Abstract base class that have summary property."""

@abstractproperty
@property
@abstractmethod
def summary(self) -> Summary:
"""
Get summary.
Expand Down
5 changes: 3 additions & 2 deletions src/caret_analyze/infra/lttng/lttng.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from __future__ import annotations

from abc import ABCMeta, abstractmethod, abstractproperty
from abc import ABCMeta, abstractmethod
from collections.abc import Iterable, Iterator, Sequence, Sized
from datetime import datetime
from functools import cached_property
Expand Down Expand Up @@ -145,7 +145,8 @@ def __iter__(self) -> Iterator[dict]:
def __len__(self) -> int:
pass

@abstractproperty
@property
@abstractmethod
def events(self) -> list[dict]:
pass

Expand Down

0 comments on commit a10d28e

Please sign in to comment.