-
Notifications
You must be signed in to change notification settings - Fork 114
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
Code refactor #689
Code refactor #689
Conversation
I scanned the entire codebase for potential issues regarding performance and readability and fixed as many issues as possible. This should make the codebase "modern" and more cleaner to read/review through. These fixes include: - Better named expressions added - f-strings added rather than interpolated variable names better conditional branching added (which is a good practice and follows standards laid out by the Python community) - code made more readable following "pythonic" code style - improved formatting based on PEP8 guidelines - added list comprehensions wherever needed replacing large, complex-looking code blocks - `TODO.md` formatted based on Markdown file guidelines.
I started the CI tests now. Ping me once this is ready for review. |
Its ready. The only problem is the style checker finds a problem: rednotebook/gui/clouds.py:149:111: E501 line too long (117 > 110 characters) |
rednotebook/gui/clouds.py
Outdated
'<a href="/#search-%s">' | ||
'<span style="font-size:%spx">%s</span></a> ' | ||
% (self.link_index, font_size, word) | ||
f'<a href="/#search-{self.link_index}"><span style="font-size:{font_size}px">{word}</span></a> ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f'<a href="/#search-{self.link_index}"><span style="font-size:{font_size}px">{word}</span></a> ' | |
f'<a href="/#search-{self.link_index}"><span ' | |
f'style="font-size:{font_size}px">{word}</span></a> ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's a nice way to break it.
Best to break the line, I think. |
I amended the previous commit to add the line break. |
@jendrikseipp I think you missed the previous message. |
Thanks @HighnessAtharva and @laraconda for your work on this! Nice to see the code improve in so many places! |
Summary of the changes in this pull request
It was not possible to start the program via
python3 rednotebook/journal.py
. Now it is possible after reverting the file jorunal.py (as suggested here: https://github.com/jendrikseipp/rednotebook/pull/663/files#r1064037003)Pull request checklist
CHANGELOG.md
including my name and issue and/or pull request number.TODO.md
.