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
Run black and flake over the code and make fixes where needed #8
Merged
Conversation
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
TrueBrain
force-pushed
the
black
branch
2 times, most recently
from
September 21, 2020 08:52
78bf459
to
5e88c42
Compare
LordAro
reviewed
Sep 21, 2020
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.
Just some thoughts. Feel free to disagree/ignore as you see fit.
I'd remove all the vim fold markers (# {{{
& # }}}
) as well - they've been moved around in unhelpful and inconsistent ways
TrueBrain
force-pushed
the
black
branch
2 times, most recently
from
September 21, 2020 10:54
cca9b34
to
ba14c9d
Compare
This makes the coding standard in the same style, and in line with PEP-8, and in line with all other projects OpenTTD runs. bottle.py is excluded, as it is an external library.
Instead of using fold markers that only vim supports to make the code more readable, a better choice would be to move classes in their own files in a new folder. This means other editors also benefit from the better clustering of information. As currently the markers drifted from their intended purpose, it is better to remove them and leave the splitting up for an day.
parameter_info_table is now outside of validation, to keep the manual spacing. This required moving the classes over multiple files, to avoid import cycles and keep everything working.
frosch123
approved these changes
Sep 21, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ignore the "black" commit; trust me, it is:
black -l 120 --exclude webtranslate/bottle.py webtranslate scripts/filter_update_langs scripts/lang_sync run
ran over the code. Validate if you want to.The other two commits are the interesting ones.