Skip to content

Conversation

@briangreunke
Copy link
Contributor

@briangreunke briangreunke commented Sep 5, 2025

Fix Import errors for text extras in Scorers


Generated Summary:

  • Refactored imports to be lazy-loaded where necessary, improving module load times and potentially reducing memory usage.
  • Added type ignore comments to imports that may not be found, preventing type-checking errors while maintaining compatibility.
  • Updated the exception handling for module imports across multiple scorer files, improving error messages for users when dependencies are missing.
  • Cleaned up the pyproject.toml file by removing an outdated datasets dependency and adding a new datasets dependency with a specified range.
  • Adjusted mypy configuration for better type checking by ignoring specific errors related to unused imports and untyped imports in the dreadnode.scorers module.

Potential impact:

  • Should enhance runtime performance by deferring import execution.
  • Increases clarity of error messages for missing dependencies, aiding in smoother developer experience.
  • Maintains code structure and readiness for type checking in a more efficient manner.

This summary was generated with ❤️ by rigging

@dreadnode-renovate-bot dreadnode-renovate-bot bot added the area/python Changes to Python package configuration and dependencies label Sep 5, 2025
@briangreunke briangreunke marked this pull request as ready for review September 6, 2025 03:14
@briangreunke briangreunke merged commit 8d42d4a into main Sep 6, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/python Changes to Python package configuration and dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants