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
There are some readability improvements that could be made to the loader() function in core/loader:loader. For example checking if some_string == '' is redundant. An empty string is cast to False in python (L27).
On L29 rather than use a break a continue would be more appropriate since you want to go to the next iteration rather than stop the iteration entirely.
L37 serves no purpose to be inside the main for-loop. It could be defined even before the with-block.
L39 could be replaced with a call to the filter() function which removes the need to copy the data into a new list.
branch suggestion: refactor/loader:loader
commit suggestion: refactor: #64 - refactor loader fn we like to see conventional commits
The text was updated successfully, but these errors were encountered:
Nate1729
changed the title
Factor: Improve clarity and readability of loader function
Refactor: Improve clarity and readability of loader function
Oct 8, 2022
Description here
There are some readability improvements that could be made to the
loader()
function incore/loader:loader
. For example checkingif some_string == ''
is redundant. An empty string is cast toFalse
in python (L27).On
L29
rather than use abreak
acontinue
would be more appropriate since you want to go to the next iteration rather than stop the iteration entirely.L37
serves no purpose to be inside the main for-loop. It could be defined even before the with-block.L39
could be replaced with a call to thefilter()
function which removes the need to copy the data into a new list.branch suggestion:
refactor/loader:loader
commit suggestion:
refactor: #64 - refactor loader fn
we like to see conventional commits
The text was updated successfully, but these errors were encountered: