Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Still need to use strenum to be able to generate car list in lpdp
Browse files Browse the repository at this point in the history
  • Loading branch information
eFiniLan committed Feb 5, 2024
1 parent be634c1 commit 4d4938e
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 20 deletions.
3 changes: 2 additions & 1 deletion selfdrive/car/body/values.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import StrEnum
# from enum import StrEnum
from strenum import StrEnum
from typing import Dict

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/chrysler/values.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import IntFlag, StrEnum
from enum import IntFlag#, StrEnum
from strenum import StrEnum
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union

Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/ford/values.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import defaultdict
from dataclasses import dataclass
from enum import Enum, StrEnum
from enum import Enum#, StrEnum
from strenum import StrEnum
from typing import Dict, List, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/gm/values.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import defaultdict
from dataclasses import dataclass
from enum import Enum, StrEnum
from enum import Enum#, StrEnum
from strenum import StrEnum
from typing import Dict, List, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/honda/values.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dataclasses import dataclass
from enum import Enum, IntFlag, StrEnum
from enum import Enum, IntFlag#, StrEnum
from strenum import StrEnum
from typing import Dict, List, Optional, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/hyundai/values.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
from dataclasses import dataclass
from enum import Enum, IntFlag, StrEnum
from enum import Enum, IntFlag#, StrEnum
from strenum import StrEnum
from typing import Dict, List, Optional, Set, Tuple, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/mazda/values.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dataclasses import dataclass, field
from enum import StrEnum
# from enum import StrEnum
from strenum import StrEnum
from typing import Dict, List, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/mock/values.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import StrEnum
# from enum import StrEnum
from strenum import StrEnum
from typing import Dict, List, Optional, Union

from openpilot.selfdrive.car.docs_definitions import CarInfo
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/nissan/values.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dataclasses import dataclass, field
from enum import StrEnum
# from enum import StrEnum
from strenum import StrEnum
from typing import Dict, List, Optional, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/subaru/values.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dataclasses import dataclass, field
from enum import Enum, IntFlag, StrEnum
from enum import Enum, IntFlag#, StrEnum
from strenum import StrEnum
from typing import Dict, List, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/tesla/values.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from collections import namedtuple
from enum import StrEnum
# from enum import StrEnum
from strenum import StrEnum
from typing import Dict, List, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/toyota/values.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import re
from collections import defaultdict
from dataclasses import dataclass, field
from enum import Enum, IntFlag, StrEnum
from enum import Enum, IntFlag#, StrEnum
from strenum import StrEnum
from typing import Dict, List, Set, Union

from cereal import car
Expand Down
3 changes: 2 additions & 1 deletion selfdrive/car/volkswagen/values.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import defaultdict, namedtuple
from dataclasses import dataclass, field
from enum import Enum, IntFlag, StrEnum
from enum import Enum, IntFlag#, StrEnum
from strenum import StrEnum
from typing import Dict, List, Union

from cereal import car
Expand Down
7 changes: 0 additions & 7 deletions selfdrive/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ def manager_thread() -> None:


def main() -> None:
# rick - use strenum.StrEnum istead of enum.StrEnum (which is missing in python 3.8)
# Check if the enum module is already imported
if 'enum' in sys.modules:
# If enum module is imported, replace StrEnum in the enum module
from strenum import StrEnum
sys.modules['enum'].StrEnum = StrEnum

prepare_only = os.getenv("PREPAREONLY") is not None

manager_init()
Expand Down

0 comments on commit 4d4938e

Please sign in to comment.