You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed there are three lambda declarations. They look to me like they would benefit from being extracted into functions (in the style of _function_name). Each suggestion is below each link. Note I gave placeholder names to extracted functions. They're not full-blown names.
@Solomon1732 thank you for your contributions to improving Tribler's code quality. If it's not too much trouble, could you kindly convert this issue into a pull request? This way, we could avoid duplication of work, as it would save us the step of implementing the string replacements that you've described. Plus, we could run tests on the modified code to ensure its correctness.
Thank you in advance for your consideration.
Describe the bug
Extracting lambdas
I noticed there are three
lambda
declarations. They look to me like they would benefit from being extracted into functions (in the style of_function_name
). Each suggestion is below each link. Note I gave placeholder names to extracted functions. They're not full-blown names.tribler/src/tribler/core/components/tunnel/community/dispatcher.py
Line 123 in 8df8154
tribler/doc/conf.py
Line 52 in 8df8154
tribler/src/tribler/core/components/tunnel/community/tunnel_community.py
Line 506 in 8df8154
Replacing lambdas with built-ins or library functions
These lambdas can be replaces with built-in functions or library ones, mainly from the python library operator module.
tribler/src/tribler/core/components/reporter/reported_error.py
Line 10 in 8df8154
tribler/src/tribler/gui/widgets/graphs/timeseriesplot.py
Line 48 in 8df8154
tribler/src/tribler/gui/dialogs/feedbackdialog.py
Line 130 in 8df8154
tribler/src/tribler/gui/widgets/graphs/timeseriesplot.py
Line 48 in 8df8154
tribler/src/tribler/core/components/metadata_store/restapi/search_endpoint.py
Line 60 in 8df8154
tribler/src/tribler/core/components/gigachannel/community/gigachannel_community.py
Line 50 in 8df8154
tribler/src/tribler/core/components/gigachannel/community/gigachannel_community.py
Line 67 in 8df8154
tribler/src/tribler/gui/widgets/downloadsdetailstabwidget.py
Line 30 in 8df8154
tribler/src/tribler/core/components/libtorrent/download_manager/download_manager.py
Line 255 in 8df8154
The text was updated successfully, but these errors were encountered: