mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 08:16:06 +08:00
car docs: fix diff bot (#28266)
* test bot
* fix docs bot
* revert
* use dataclass
* sad this doesn't work
old-commit-hash: eee8a7a4b4
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