Skip to content

chore: remove dead code in crawler.py — CONFIG_PREFIXES_OF_INTEREST and unused top variable#18

Open
bipinhcs11 wants to merge 1 commit into
mainfrom
chore/remove-dead-code-config-prefixes
Open

chore: remove dead code in crawler.py — CONFIG_PREFIXES_OF_INTEREST and unused top variable#18
bipinhcs11 wants to merge 1 commit into
mainfrom
chore/remove-dead-code-config-prefixes

Conversation

@bipinhcs11
Copy link
Copy Markdown
Owner

What

Two-line dead-code removal in tools/skill_generator/crawler.py.

Why

These are orphaned remnants from an incomplete filtering design that was noted as a follow-up in the review comments of PRs #15 and #16 but never acted on:

1. CONFIG_PREFIXES_OF_INTEREST (lines 58–62 before this PR)

CONFIG_PREFIXES_OF_INTEREST = (
    "datasource", "spring.datasource", "mail", "spring.mail",
    "file", "batch", "spring.batch", "queue", "scheduler",
    "quartz", "kafka", "redis", "app", "logging",
)

Defined at module level, never referenced in any code. The docstring of _extract_properties_prefixes claimed the function filtered against it — it never did. Confirmed with a full-repo grep: only appears in its own definition and the stale docstring.

2. top = key.split(".", 1)[0] in _extract_properties_prefixes

Assigned but never read. Would have been the variable used to drive the filter that was never wired up.

Changes

File Change
tools/skill_generator/crawler.py Remove CONFIG_PREFIXES_OF_INTEREST constant (6 lines); remove top = … assignment (1 line); update docstring to describe what the function actually does

Behaviour impact

None. top was never read, so its removal cannot change any output. The constant was never referenced, so its removal cannot change any behaviour. This is pure dead-code cleanup.

Test impact

172 tests pass unchanged. No test referenced CONFIG_PREFIXES_OF_INTEREST (confirmed by grep).

Follow-ups in other open PRs


Generated by Claude Code

…nd top variable

Two orphaned remnants of an incomplete filtering design:

1. CONFIG_PREFIXES_OF_INTEREST — defined at module level but never
   referenced in any code. The docstring of _extract_properties_prefixes
   claimed the function filtered against this constant, but it never did.

2. top = key.split(".", 1)[0] in _extract_properties_prefixes — assigned
   but never read; would have been used for the filter that was never wired.

Both were noted as follow-ups in the PR #15 and PR #16 review notes.

Zero behaviour change: top was never read, so removing it cannot affect
output. Updated the docstring to describe what the function actually does.
172 tests pass unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants