mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 11:13:53 +08:00
car docs: fix diff bot (#28266)
* test bot * fix docs bot * revert * use dataclass * sad this doesn't work
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import re
|
||||
from abc import ABC, abstractmethod
|
||||
from collections import namedtuple
|
||||
from dataclasses import dataclass, field
|
||||
from enum import Enum
|
||||
@@ -39,12 +38,11 @@ class PartType(Enum):
|
||||
mount = "Mount"
|
||||
|
||||
|
||||
class Part(ABC):
|
||||
def __init__(self, name: str):
|
||||
self.name = name
|
||||
@dataclass
|
||||
class Part:
|
||||
name: str
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def type(self) -> PartType:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
Reference in New Issue
Block a user