mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-14 04:57:53 -06:00
refactor: remove dataclass dependency
This commit is contained in:
parent
3031e5fb7f
commit
c7bcdfefee
1 changed files with 18 additions and 10 deletions
|
@ -32,7 +32,6 @@ from argparse import (
|
||||||
)
|
)
|
||||||
from argparse import ArgumentParser as StdArgParser
|
from argparse import ArgumentParser as StdArgParser
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from dataclasses import dataclass
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from logging.handlers import RotatingFileHandler
|
from logging.handlers import RotatingFileHandler
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -53,7 +52,7 @@ from typing import (
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
|
||||||
__version__ = "23.8b1-6-g19c39ad-dev"
|
__version__ = "23.8b1-7-g3031e5f-dev"
|
||||||
|
|
||||||
|
|
||||||
class Spinner:
|
class Spinner:
|
||||||
|
@ -800,15 +799,24 @@ def get_hash(spec: Tuple[str, ...] | List[str], track_exe: bool = False) -> str:
|
||||||
return sha256.hexdigest()
|
return sha256.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class Meta:
|
class Meta:
|
||||||
name: str
|
def __init__(
|
||||||
id: str
|
self,
|
||||||
spec: List[str]
|
name: str,
|
||||||
files: List[str]
|
id: str,
|
||||||
exe: str
|
spec: List[str],
|
||||||
created: str = ""
|
files: List[str],
|
||||||
accessed: str = ""
|
exe: str,
|
||||||
|
created: str = "",
|
||||||
|
accessed: str = "",
|
||||||
|
):
|
||||||
|
self.name = name
|
||||||
|
self.id = id
|
||||||
|
self.spec = spec
|
||||||
|
self.files = files
|
||||||
|
self.exe = exe
|
||||||
|
self.created = created
|
||||||
|
self.accessed = accessed
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def load(cls, name: str) -> "Meta":
|
def load(cls, name: str) -> "Meta":
|
||||||
|
|
Loading…
Reference in a new issue