Skip to content

Commit f3def0f

Browse files
style: fix code formatting per ruff-format requirements
1 parent ba9f7f3 commit f3def0f

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"manifestVersion": "v3",
3+
"name": "testdigitalauto",
4+
"interfaces": [
5+
{
6+
"type": "vehicle-signal-interface",
7+
"config": {
8+
"src": "./app/vspec.json",
9+
"datapoints": {
10+
"required": [
11+
{
12+
"path": "Vehicle.Chassis.Axle.Row1.Wheel.Left.Speed",
13+
"access": "read"
14+
},
15+
{
16+
"path": "Vehicle.Chassis.Axle.Row1.Wheel.Right.Speed",
17+
"access": "read"
18+
},
19+
{
20+
"path": "Vehicle.Chassis.Accelerator.PedalPosition",
21+
"access": "read"
22+
},
23+
{
24+
"path": "Vehicle.Chassis.Brake.PedalPosition",
25+
"access": "read"
26+
}
27+
]
28+
}
29+
}
30+
},
31+
{
32+
"type": "pubsub",
33+
"config": {
34+
"reads": [
35+
"sampleapp/getSpeed"
36+
],
37+
"writes": [
38+
"sampleapp/getSpeed/response",
39+
"sampleapp/currentSpeed"
40+
]
41+
}
42+
}
43+
]
44+
}

fix_format.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Quick fix for pre-commit linting issues
2+
import json
3+
4+
# Fix vspec.json - format properly with indentation
5+
print("Formatting vspec.json...")
6+
with open('app/vspec.json', 'r', encoding='utf-8') as f:
7+
data = json.load(f)
8+
9+
with open('app/vspec.json', 'w', encoding='utf-8') as f:
10+
json.dump(data, f, indent=4, ensure_ascii=False)
11+
f.write('\n') # Ensure trailing newline
12+
13+
print("Formatting AppManifest.json...")
14+
with open('app/AppManifest.json', 'r', encoding='utf-8') as f:
15+
data = json.load(f)
16+
17+
with open('app/AppManifest.json', 'w', encoding='utf-8') as f:
18+
json.dump(data, f, indent=4, ensure_ascii=False)
19+
f.write('\n') # Ensure trailing newline
20+
21+
print("Done! Files formatted with proper indentation and trailing newlines.")

0 commit comments

Comments
 (0)