Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Improve clarity and readability of loader function #64

Open
Nate1729 opened this issue Oct 8, 2022 · 2 comments
Open

Refactor: Improve clarity and readability of loader function #64

Nate1729 opened this issue Oct 8, 2022 · 2 comments

Comments

@Nate1729
Copy link
Contributor

Nate1729 commented Oct 8, 2022

Description here

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

@Nate1729 Nate1729 changed the title Factor: Improve clarity and readability of loader function Refactor: Improve clarity and readability of loader function Oct 8, 2022
@RackReaver
Copy link
Owner

Is this a bug or just a code improvement?

@Nate1729
Copy link
Contributor Author

Is this a bug or just a code improvement?

This is just a code improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants