Skip to content

Commit

Permalink
refactor: remove
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <[email protected]>
  • Loading branch information
ktro2828 committed Nov 12, 2024
1 parent 9bf5643 commit b480214
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 48 deletions.
12 changes: 1 addition & 11 deletions t4_devkit/schema/name.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
from __future__ import annotations

from enum import Enum
import sys

if sys.version_info < (3, 11):

class StrEnum(str, Enum):
pass

else:
from enum import StrEnum


__all__ = ("SchemaName",)


class SchemaName(StrEnum):
class SchemaName(str, Enum):
"""An enum to represent schema filenames.
Attributes:
Expand Down
15 changes: 3 additions & 12 deletions t4_devkit/schema/tables/sample_data.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,22 @@
from __future__ import annotations

from dataclasses import dataclass, field
import sys
from enum import Enum
from typing import TYPE_CHECKING, Any

from typing_extensions import Self

from ..name import SchemaName
from .base import SchemaBase
from .registry import SCHEMAS
from ..name import SchemaName

if sys.version_info < (3, 11):
from enum import Enum

class StrEnum(str, Enum):
pass

else:
from enum import StrEnum

if TYPE_CHECKING:
from .sensor import SensorModality

__all__ = ("SampleData", "FileFormat")


class FileFormat(StrEnum):
class FileFormat(str, Enum):
"""An enum to represent file formats.
Attributes:
Expand Down
14 changes: 2 additions & 12 deletions t4_devkit/schema/tables/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,18 @@

from dataclasses import dataclass, field
from enum import Enum
import sys
from typing import Any

from typing_extensions import Self

from ..name import SchemaName
from .base import SchemaBase
from .registry import SCHEMAS
from ..name import SchemaName

if sys.version_info < (3, 11):

class StrEnum(str, Enum):
pass

else:
from enum import StrEnum


__all__ = ("Sensor", "SensorModality")


class SensorModality(StrEnum):
class SensorModality(str, Enum):
"""An enum to represent sensor modalities.
Attributes:
Expand Down
17 changes: 4 additions & 13 deletions t4_devkit/schema/tables/visibility.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
from __future__ import annotations

import warnings
from dataclasses import dataclass
import sys
from enum import Enum
from typing import Any
import warnings

from typing_extensions import Self

from ..name import SchemaName
from .base import SchemaBase
from .registry import SCHEMAS
from ..name import SchemaName

if sys.version_info < (3, 11):
from enum import Enum

class StrEnum(str, Enum):
pass

else:
from enum import StrEnum

__all__ = ("Visibility", "VisibilityLevel")


class VisibilityLevel(StrEnum):
class VisibilityLevel(str, Enum):
"""An enum to represent visibility levels.
Attributes:
Expand Down

0 comments on commit b480214

Please sign in to comment.