-
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.
Replace lambdas with function calls. This was done either by extracting a lambda into a function or method, or by replacing it with a library function call. Minor code changes: The `u` prefix was removed from strings. Instead of using the `%` operator with strings or concatenating multiple of them, f-strings were used. Replaced complex one-like if-else chains with dicts and calls to `dict.get`. Instead of creating lists and adding them (which returns a new list), a list is created from the get-go by extending it via the star operator during its creation. Change according to code review In test_download_manager.py, I replaced lambdas with `MagicMock` and `AsyncMock` as appropriate. I also rearranged mock methods inside tests. In `dispatcher.py`, I rewrote lambda as an internal callback function. In `conf.py`, I extracted a lambda into a function. In `gigachannel_community.py`, I extracted two repeated lambdas into a single module-internal function.
- Loading branch information
1 parent
0d9a839
commit 5f1434f
Showing
15 changed files
with
202 additions
and
116 deletions.
There are no files selected for viewing
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
Oops, something went wrong.