Skip to content

Commit 021529d

Browse files
committed
style: fix ruff lint errors in bob integration files
1 parent 4f3119f commit 021529d

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎src/specify_cli/integrations/bob/__init__.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,7 @@ def build_command_invocation(
284284
return super().build_command_invocation(command_name, args)
285285

286286
stem = command_name
287-
if stem.startswith("speckit."):
288-
stem = stem[len("speckit."):]
287+
stem = stem.removeprefix("speckit.")
289288
invocation = "/speckit-" + stem.replace(".", "-")
290289
return f"{invocation} {args}" if args else invocation
291290

‎tests/integrations/test_integration_bob.py‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ class TestBobInitFlowDefault:
379379

380380
def test_init_default_creates_skills(self, tmp_path):
381381
from typer.testing import CliRunner
382+
382383
from specify_cli import app
383384

384385
target = tmp_path / "test-proj"
@@ -392,6 +393,7 @@ def test_init_default_creates_skills(self, tmp_path):
392393

393394
def test_init_default_complete_file_inventory_sh(self, tmp_path):
394395
from typer.testing import CliRunner
396+
395397
from specify_cli import app
396398

397399
project = tmp_path / "inventory-sh-bob"
@@ -422,6 +424,7 @@ class TestBobInitFlowLegacy:
422424

423425
def test_init_legacy_creates_commands(self, tmp_path):
424426
from typer.testing import CliRunner
427+
425428
from specify_cli import app
426429

427430
target = tmp_path / "test-proj"
@@ -445,8 +448,8 @@ def test_init_legacy_does_not_set_ai_skills(self, tmp_path):
445448
legacy projects.)
446449
"""
447450
from typer.testing import CliRunner
448-
from specify_cli import app
449-
from specify_cli import load_init_options
451+
452+
from specify_cli import app, load_init_options
450453

451454
target = tmp_path / "test-proj"
452455
result = CliRunner().invoke(app, [
@@ -504,6 +507,7 @@ def test_skills_mode_project_extension_registration_skipped(self, tmp_path):
504507
def test_legacy_mode_project_extension_registration_runs(self, tmp_path):
505508
"""Extension registrar writes to .bob/commands/ for legacy-mode projects."""
506509
import textwrap
510+
507511
from specify_cli.agents import CommandRegistrar
508512

509513
# Simulate a legacy-mode Bob project: .bob/commands exists, .bob/skills does not
@@ -543,6 +547,7 @@ def test_legacy_extension_command_refs_use_dot_separator(self, tmp_path):
543547
BobIntegration.invoke_separator_for_mode(False) -> ".".
544548
"""
545549
import textwrap
550+
546551
from specify_cli.agents import CommandRegistrar
547552

548553
# Legacy-mode project: .bob/commands exists, ai_skills is NOT set.
@@ -582,10 +587,10 @@ def test_update_init_options_preserves_legacy_commands_project(self, tmp_path):
582587
"""``use``/``switch``/``upgrade`` on a ``.bob/commands``-only project
583588
(no stored ``legacy_commands``) must not write ``ai_skills=True``.
584589
"""
590+
from specify_cli import load_init_options
585591
from specify_cli.integrations._helpers import (
586592
_update_init_options_for_integration,
587593
)
588-
from specify_cli import load_init_options
589594

590595
# Existing Bob 1.x project: legacy commands dir on disk, no ai_skills.
591596
cmds = tmp_path / ".bob" / "commands"
@@ -604,10 +609,10 @@ def test_update_init_options_preserves_legacy_commands_project(self, tmp_path):
604609

605610
def test_update_init_options_keeps_skills_project_as_skills(self, tmp_path):
606611
"""A ``.bob/skills`` project stays skills on re-activation."""
612+
from specify_cli import load_init_options
607613
from specify_cli.integrations._helpers import (
608614
_update_init_options_for_integration,
609615
)
610-
from specify_cli import load_init_options
611616

612617
(tmp_path / ".bob" / "skills" / "speckit-plan").mkdir(parents=True)
613618
bob = get_integration("bob")
@@ -648,7 +653,9 @@ def test_use_force_keeps_legacy_command_refs_in_shared_templates(self, tmp_path)
648653
with ``/speckit.<cmd>`` (dot), not ``/speckit-<cmd>``.
649654
"""
650655
import json
656+
651657
from typer.testing import CliRunner
658+
652659
from specify_cli import app
653660

654661
# Create a real legacy Bob project (renders shared templates).

0 commit comments

Comments
 (0)