This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

workspace-manager: satisfy ruff 0.16 default rules

+7 -5
+4 -4
tools/workspace-manager/daemon.py
··· 179 179 except FileNotFoundError: 180 180 print("swaymsg not found, retrying in 10 seconds...", file=sys.stderr) 181 181 await asyncio.sleep(10) 182 - except Exception as e: 182 + except Exception as e: # noqa: BLE001 183 183 print( 184 184 f"Error in sway subscription: {e}, retrying in 5 seconds...", 185 185 file=sys.stderr, ··· 271 271 272 272 writer.write(json.dumps(response).encode() + b"\n") 273 273 await writer.drain() 274 - except Exception as e: 274 + except Exception as e: # noqa: BLE001 275 275 print(f"Error handling client: {e}", file=sys.stderr) 276 276 finally: 277 277 writer.close() ··· 310 310 if ws.get("focused"): 311 311 name = ws.get("name") 312 312 return str(name) if name is not None else None 313 - except Exception as e: 313 + except Exception as e: # noqa: BLE001 314 314 print(f"Failed to get current workspace: {e}", file=sys.stderr) 315 315 return None 316 316 ··· 331 331 ) 332 332 await proc.wait() 333 333 print("Registered sway rule for anchor window", file=sys.stderr) 334 - except Exception as e: 334 + except Exception as e: # noqa: BLE001 335 335 print(f"Failed to register anchor sway rule: {e}", file=sys.stderr) 336 336 337 337 initial_workspace = await get_current_workspace()
+3 -1
tools/workspace-manager/workspace-tabs-host.py
··· 41 41 def run(cmd: list[str], timeout: float = 2) -> str: 42 42 """Run a command and return stripped stdout, or empty string on failure.""" 43 43 try: 44 - r = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout) # noqa: S603 44 + r = subprocess.run( 45 + cmd, capture_output=True, text=True, timeout=timeout, check=False 46 + ) 45 47 except (OSError, subprocess.TimeoutExpired): 46 48 return "" 47 49 return r.stdout.strip() if r.returncode == 0 else ""