Skip to content

Commit 63a1ab1

Browse files
committed
fix: lint/spelling/shear CI failures
- ruff F541: remove f-prefix from string without placeholders in test_keyboard_lcm.py - typos: serialised → serialized in ws.rs - lint.py: add blank lines before doc comments and methods in viewer.rs - lint.py: fix double space in ws.rs comment - cargo-shear: remove unused clap dependency
1 parent c6346fe commit 63a1ab1

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

dimos/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ rerun = { path = "../crates/top/rerun", default-features = false, features = [
2626
"server",
2727
] }
2828

29-
clap = { workspace = true, features = ["derive"] }
3029
bincode.workspace = true
3130
futures-util.workspace = true
3231
mimalloc.workspace = true

dimos/src/interaction/ws.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub enum WsEvent {
4141
Stop,
4242
}
4343

44-
/// Sends `WsEvent`s (serialised to JSON) to a remote WebSocket server.
44+
/// Sends `WsEvent`s (serialized to JSON) to a remote WebSocket server.
4545
///
4646
/// Maintains a persistent connection with automatic reconnection. The
4747
/// internal sender is `Clone`, so you can hand copies to multiple producers
@@ -143,7 +143,7 @@ async fn run_client(url: String, mut rx: mpsc::Receiver<String>) {
143143

144144
// Read task: consume incoming frames (ping → auto pong) so the
145145
// server's keepalive pings get answered and the connection stays
146-
// alive. Exits when the server closes or an error occurs.
146+
// alive. Exits when the server closes or an error occurs.
147147
let mut read_handle = tokio::spawn(async move {
148148
while let Some(frame) = reader.next().await {
149149
match frame {

dimos/src/viewer.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ static GLOBAL: re_memory::AccountingAllocator<mimalloc::MiMalloc> =
1717

1818
/// Default WebSocket server URL
1919
const DEFAULT_WS_URL: &str = "ws://127.0.0.1:3030/ws";
20+
2021
/// Minimum time between click events (debouncing)
2122
const CLICK_DEBOUNCE_MS: u64 = 100;
23+
2224
/// Maximum rapid clicks before logging a warning
2325
const RAPID_CLICK_THRESHOLD: usize = 5;
2426

@@ -36,9 +38,13 @@ impl eframe::App for DimosApp {
3638
}
3739

3840
fn save(&mut self, storage: &mut dyn eframe::Storage) { self.inner.save(storage); }
41+
3942
fn clear_color(&self, visuals: &egui::Visuals) -> [f32; 4] { self.inner.clear_color(visuals) }
43+
4044
fn persist_egui_memory(&self) -> bool { self.inner.persist_egui_memory() }
45+
4146
fn auto_save_interval(&self) -> Duration { self.inner.auto_save_interval() }
47+
4248
fn raw_input_hook(&mut self, ctx: &egui::Context, raw_input: &mut egui::RawInput) {
4349
self.inner.raw_input_hook(ctx, raw_input);
4450
}

test_keyboard_lcm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import struct
88
import sys
99

10+
1011
def test_twist_encoding():
1112
"""Verify Twist encoding matches Python LCM reference."""
1213
# This is what the Rust viewer now produces for Twist (no Header)
@@ -33,7 +34,7 @@ def rot(h):
3334
assert buf.hex() == expected_hex, f"Encoding mismatch:\n got: {buf.hex()}\n expect: {expected_hex}"
3435

3536
print("PASS: Twist encoding matches Python LCM reference (56 bytes)")
36-
print(f" Channel: /cmd_vel#geometry_msgs.Twist")
37+
print(" Channel: /cmd_vel#geometry_msgs.Twist")
3738
print(f" Hash: 0x{twist_hash:016x}")
3839

3940
def test_channel_name():

0 commit comments

Comments
 (0)