-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor magnet link creation and testing
Magnet link creation logic has been refactored for better clarity and maintainability. The 'create_magnet' method from the DownloadsDetailsTabWidget class was removed, and its functionality was integrated into the 'compose_magnetlink' function in utilities.py. This change simplifies the codebase by centralizing magnet link generation in one place. The tests for creating magnet links were also moved from test_downloadsdetailstabwidget.py to test_utilities.py to reflect this change. Additional checks were added to ensure that invalid URLs are properly handled during magnet link creation. In addition, type hints were added to the 'compose_magnetlink' function for improved readability and understanding of expected input types.
- Loading branch information
Showing
4 changed files
with
51 additions
and
68 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters