Skip to content

Commit d9c86b5

Browse files
authored
Anchor import statements (#14)
This will allow the repo to be cloned into other repos and used from any folder location.
1 parent f6ec8ec commit d9c86b5

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

python/__init__.py

Whitespace-only changes.

python/command_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from typing import Dict, List, Optional, Set, Any, Tuple
33
from enum import Enum
44

5-
from can_frame import CANFrame, CANPacket, CANFrameScanner, CANIDFormat
6-
from signals import Command, Scaling
5+
from .can_frame import CANFrame, CANPacket, CANFrameScanner, CANIDFormat
6+
from .signals import Command, Scaling
77

88
class ServiceType(Enum):
99
SERVICE_21 = 0x21

python/signals_testing.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import pytest
22
from typing import Dict, Any, Optional
3-
from can_frame import CANIDFormat
4-
from command_registry import decode_obd_response
5-
from signals import SignalSet, Command, Signal, Scaling
3+
4+
from .can_frame import CANIDFormat
5+
from .command_registry import decode_obd_response
6+
from .signals import SignalSet, Command, Signal, Scaling
67

78
def obd_testrunner(
89
signalset_json: str,

python/test_can_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
from can_frame import (
2+
from .can_frame import (
33
CANFrame, CANFrameScanner, CANIDFormat, CANFrameError,
44
DataFrameType, DataFrameHeader
55
)

python/test_command_registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from typing import Dict, Any, List
33
import json
44

5-
from command_registry import CommandRegistry, CommandResponse, ServiceType
6-
from signals import SignalSet, Command, Signal, Scaling, Parameter, ParameterType
7-
from can_frame import CANPacket
5+
from .command_registry import CommandRegistry, CommandResponse, ServiceType
6+
from .signals import SignalSet, Command, Signal, Scaling, Parameter, ParameterType
7+
from .can_frame import CANPacket
88

99
def create_test_command(
1010
pid: int,

python/test_f150.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import pytest
2-
from signals_testing import obd_testrunner
32
import json
43
import os
54

5+
from .signals_testing import obd_testrunner
6+
67
REPO_ROOT = os.path.abspath(os.path.dirname(__file__))
78

89
TEST_CASES = [

0 commit comments

Comments
 (0)