Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(client): remove deprecated abstractproperty #927

Merged
merged 1 commit into from
Aug 18, 2022
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
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