1
0
mirror of synced 2024-11-27 22:40:49 +01:00

classes.py: Remove slots=True

This commit is contained in:
Viv 2023-08-05 11:02:53 -04:00
parent 018d09d34c
commit 7b5e09cb05

View File

@ -12,7 +12,7 @@ from dataclasses import dataclass, field, fields
from tja2fumen.constants import BRANCH_NAMES from tja2fumen.constants import BRANCH_NAMES
@dataclass(slots=True) @dataclass()
class TJAData: class TJAData:
"""Contains the information for a single note or single command.""" """Contains the information for a single note or single command."""
name: str name: str
@ -20,7 +20,7 @@ class TJAData:
pos: int # For TJAs, 'pos' is stored as an int rather than in milliseconds pos: int # For TJAs, 'pos' is stored as an int rather than in milliseconds
@dataclass(slots=True) @dataclass()
class TJAMeasure: class TJAMeasure:
"""Contains all the data in a single TJA measure (denoted by ',').""" """Contains all the data in a single TJA measure (denoted by ',')."""
notes: list[str] = field(default_factory=list) notes: list[str] = field(default_factory=list)
@ -28,7 +28,7 @@ class TJAMeasure:
combined: list[TJAData] = field(default_factory=list) combined: list[TJAData] = field(default_factory=list)
@dataclass(slots=True) @dataclass()
class TJACourse: class TJACourse:
"""Contains all the data in a single TJA `COURSE:` section.""" """Contains all the data in a single TJA `COURSE:` section."""
bpm: float bpm: float
@ -42,7 +42,7 @@ class TJACourse:
branches: dict[str, list[TJAMeasure]] = field(default_factory=dict) branches: dict[str, list[TJAMeasure]] = field(default_factory=dict)
@dataclass(slots=True) @dataclass()
class TJASong: class TJASong:
"""Contains all the data in a single TJA (`.tja`) chart file.""" """Contains all the data in a single TJA (`.tja`) chart file."""
bpm: float bpm: float
@ -50,7 +50,7 @@ class TJASong:
courses: dict[str, TJACourse] courses: dict[str, TJACourse]
@dataclass(slots=True) @dataclass()
class TJAMeasureProcessed: class TJAMeasureProcessed:
""" """
Contains all the data in a single TJA measure (denoted by ','), but with Contains all the data in a single TJA measure (denoted by ','), but with
@ -77,7 +77,7 @@ class TJAMeasureProcessed:
notes: list[TJAData] = field(default_factory=list) notes: list[TJAData] = field(default_factory=list)
@dataclass(slots=True) @dataclass()
class FumenNote: class FumenNote:
"""Contains all the byte values for a single Fumen note.""" """Contains all the byte values for a single Fumen note."""
note_type: str = '' note_type: str = ''
@ -93,7 +93,7 @@ class FumenNote:
drumroll_bytes: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00' drumroll_bytes: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00'
@dataclass(slots=True) @dataclass()
class FumenBranch: class FumenBranch:
"""Contains all the data in a single Fumen branch.""" """Contains all the data in a single Fumen branch."""
length: int = 0 length: int = 0
@ -102,7 +102,7 @@ class FumenBranch:
notes: list[FumenNote] = field(default_factory=list) notes: list[FumenNote] = field(default_factory=list)
@dataclass(slots=True) @dataclass()
class FumenMeasure: class FumenMeasure:
"""Contains all the data in a single Fumen measure.""" """Contains all the data in a single Fumen measure."""
bpm: float = 0.0 bpm: float = 0.0
@ -218,7 +218,7 @@ class FumenMeasure:
self.branch_info[4:6] = vals self.branch_info[4:6] = vals
@dataclass(slots=True) @dataclass()
class FumenHeader: class FumenHeader:
"""Contains all the byte values for a Fumen chart file's header.""" """Contains all the byte values for a Fumen chart file's header."""
order: str = "<" order: str = "<"
@ -343,7 +343,7 @@ class FumenHeader:
return raw_bytes return raw_bytes
@dataclass(slots=True) @dataclass()
class FumenCourse: class FumenCourse:
"""Contains all the data in a single Fumen (`.bin`) chart file.""" """Contains all the data in a single Fumen (`.bin`) chart file."""
header: FumenHeader header: FumenHeader