Skip to content

Conversation

@hemant-rgb
Copy link

Summary

This PR adds missing type hints and docstrings to improve code quality, readability, and maintainability without modifying any existing behavior.

Changes Made

  • Added missing docstring to request_post() in vulnerablecode.py.
  • Added type hints to helper functions in views.py:
    • purldb_is_configured
    • render_as_yaml
    • render_size
    • fields_have_no_values
    • do_not_disable
  • Added return type annotations to:
    • poll_until_success()
    • run_command_safely()

Why

  • Improves static analysis (Ruff ANN rules)
  • Enhances IDE autocompletion & navigation
  • Increases code consistency across the project
  • No functional changes; safe improvement

Signed-off-by

Hemant Machiwar [email protected]

@hemant-rgb hemant-rgb force-pushed the add-type-hints-and-docstring branch from 0669603 to 5d95210 Compare December 24, 2025 05:03
@tdruez
Copy link
Contributor

tdruez commented Dec 26, 2025

These changes don't appear to be linked to any agreed-upon issues.
Structural changes to the codebase (like adding type hints) should be proposed and discussed separately before implementation. This helps us maintain consistency and ensures the team is aligned on the approach.

@tdruez tdruez closed this Dec 26, 2025
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