Skip to content

fix: clean up misc_tools_parser.py#817

Open
Deez-Automations wants to merge 2 commits intoOWASP:mainfrom
Deez-Automations:fix/misc-tools-parser-cleanup
Open

fix: clean up misc_tools_parser.py#817
Deez-Automations wants to merge 2 commits intoOWASP:mainfrom
Deez-Automations:fix/misc-tools-parser-cleanup

Conversation

@Deez-Automations
Copy link

Fixes #814

Few small things I noticed in misc_tools_parser.py:

  • NamedTuple was imported but never used anywhere in the file, removed it
  • boolean from xmlrpc.client is not the right type for a simple flag param, swapped it for Python's built-in bool
  • Typo in the parser name: miscelaneous -> miscellaneous
  • logging.error() was being called directly instead of going through the module-level logger — standardized it
  • print() inside the loop replaced with logger.info() to match the rest of the codebase
  • Added List[defs.Tool] type annotation to parse_tool return type and tool_entries variable, consistent with how other parsers in this directory are typed

No logic changes, just cleanup.

Copilot AI review requested due to automatic review settings March 18, 2026 18:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Cleanup-focused PR for misc_tools_parser.py (Fixes #814) to improve typing correctness, naming, and logging consistency in the external project parser.

Changes:

  • Remove unused imports and replace xmlrpc.client.boolean with built-in bool.
  • Fix parser name typo (miscelaneousmiscellaneous).
  • Standardize logging by using the module-level logger and replacing print() with logger.info().
  • Add List[defs.Tool] return/type annotations for parse_tool and tool_entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Cleans up misc_tools_parser.py to improve typing accuracy, fix a parser display-name typo, and make logging consistent with other external project parsers (per #814).

Changes:

  • Remove unused imports and replace xmlrpc.client.boolean with built-in bool for dry_run.
  • Fix parser name typo (miscelaneousmiscellaneous) and standardize logging (logging.error/print → module logger).
  • Add List[defs.Tool] type annotations for parse_tool and tool_entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Author

@Deez-Automations Deez-Automations left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the review comments

  • fixed the dry_run early return to avoid UnboundLocalError
  • added an empty list check in parse() to prevent IndexError
  • improved the error message to include the readme path and repo url

@Deez-Automations
Copy link
Author

The e2e workflow failure appears to be a workflow file issue not related to this change, this PR only touches misc_tools_parser.py with no changes to tests or CI config. Happy to investigate further if needed.

- removed unused NamedTuple import
- replaced xmlrpc.client.boolean with built-in bool
- fixed typo in parser name (miscelaneous -> miscellaneous)
- standardized logging to use module-level logger instead of root logging
- replaced print() with logger.info() for consistency
- added proper type annotations (List[defs.Tool]) to parse_tool
- dry_run early return to avoid UnboundLocalError on repo.working_dir
- guard against empty tool_entries in parse() to avoid IndexError
- better error message that includes readme path and repo url
@Deez-Automations Deez-Automations force-pushed the fix/misc-tools-parser-cleanup branch from 6612b45 to a1d7665 Compare March 23, 2026 06:01
@Deez-Automations
Copy link
Author

Commits are now signed. The only remaining check is the e2e workflow, the entire workflow file is commented out so it fails immediately with 0s runtime. This is pre-existing and unrelated to this change.

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.

Fix typing, naming typo, and logging consistency in misc_tools_parser.py

3 participants