Skip to content

Commit

Permalink
chore(client): remove deprecated abstractproperty (#927)
Browse files Browse the repository at this point in the history
remove deprecated abstractproperty
  • Loading branch information
tianweidut authored Aug 18, 2022
1 parent fafee05 commit 30065f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client/starwhale/api/_impl/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import shutil
import struct
import typing as t
from abc import ABCMeta, abstractmethod, abstractproperty
from abc import ABCMeta, abstractmethod
from copy import deepcopy
from types import TracebackType
from pathlib import Path
Expand Down Expand Up @@ -356,7 +356,7 @@ def iter_data_slice(self, path: str) -> t.Generator[t.Any, None, None]:
def iter_label_slice(self, path: str) -> t.Generator[t.Any, None, None]:
raise NotImplementedError

@abstractproperty
@property
def data_format_type(self) -> DataFormatType:
raise NotImplementedError

Expand Down
4 changes: 2 additions & 2 deletions client/starwhale/api/_impl/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import sys
import typing as t
from abc import ABCMeta, abstractmethod, abstractproperty
from abc import ABCMeta, abstractmethod
from pathlib import Path

import boto3
Expand Down Expand Up @@ -189,7 +189,7 @@ def __str__(self) -> str:
def __repr__(self) -> str:
return f"[{self.kind.name}]DataLoader for {self.storage.backend}, extra:{self.storage.conn}"

@abstractproperty
@property
def kind(self) -> DataFormatType:
raise NotImplementedError

Expand Down
4 changes: 2 additions & 2 deletions client/starwhale/base/store.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import typing as t
import tempfile
from abc import ABCMeta, abstractmethod, abstractproperty
from abc import ABCMeta, abstractmethod
from pathlib import Path

import yaml
Expand Down Expand Up @@ -42,7 +42,7 @@ def __init__(self, uri: URI) -> None:
def _guess(self) -> t.Tuple[Path, str]:
raise NotImplementedError

@abstractproperty
@property
def recover_loc(self) -> Path:
raise NotImplementedError

Expand Down

0 comments on commit 30065f6

Please sign in to comment.