MAINT Consolidate image URL download handling - #2418
Conversation
Roman Lutz (romanlutz)
left a comment
There was a problem hiding this comment.
Looks great, but we can't merge unless you accept the CLA.
|
nightcityblade please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
I added focused coverage for both converter wrapper methods in 7f3de9e, bringing the changed download paths to full diff coverage. Validation: all 25 tests in test_image_compression_converter.py passed; Ruff check/format and git diff --check passed. The remaining merge gate is the CLA, which requires the account holder to review and accept. |
|
Description
Consolidates the duplicated asynchronous image URL downloader into one converter-internal helper while retaining the existing delegating methods. This preserves subclass overrides, patch points, byte-return behavior, aiohttp error wrapping, and cancellation propagation.
Closes #2417.
Tests and Documentation
uv run pytest -q tests/unit/converter/test_image_compression_converter.py tests/unit/converter/test_image_color_saturation_converter.py tests/unit/converter/test_image_resizing_converter.py tests/unit/converter/test_image_rotation_converter.py— 71 passeduv run pre-commit run --files pyrit/converter/base_image_to_image_converter.py pyrit/converter/image_compression_converter.py tests/unit/converter/test_image_compression_converter.py— all applicable hooks passed, including Ruff, ty, and async-suffix checks