Skip to content

Comments

[pull] main from SwanHubX:main#153

Merged
pull[bot] merged 1 commit intoxj63:mainfrom
SwanHubX:main
Dec 19, 2025
Merged

[pull] main from SwanHubX:main#153
pull[bot] merged 1 commit intoxj63:mainfrom
SwanHubX:main

Conversation

@pull
Copy link

@pull pull bot commented Dec 19, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* Add empty input checks to uploader functions

Added early return statements to uploader functions in upload.py to handle empty input lists, preventing unnecessary processing and logging debug messages. Also updated comments and TODOs for consistency in batch.py and upload.py.

* Update upload.py

* Refactor upload functions with skip_if_empty decorator

Introduced a skip_if_empty decorator to reduce code duplication by handling empty input lists for upload functions. This change improves code readability and maintainability by centralizing the empty-check logic and debug logging.

* Refactor empty list checks in uploader functions

Simplified and unified empty list checks by removing redundant length checks in upload_files and upload_columns, and improving logic in skip_if_empty and upload_media_metrics. This streamlines the code and relies on existing mechanisms for handling empty inputs.

* Improve skip_if_empty decorator argument handling

Refactored the skip_if_empty decorator to use inspect for more robust detection of the first parameter, supporting both positional and keyword arguments. This ensures the decorator works correctly regardless of how the decorated function is called.
@pull pull bot locked and limited conversation to collaborators Dec 19, 2025
@pull pull bot added the ⤵️ pull label Dec 19, 2025
@pull pull bot merged commit eab4afd into xj63:main Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant