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

Formatting of python code #109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Formatting of python code #109

wants to merge 1 commit into from

Conversation

mmicko
Copy link
Member

@mmicko mmicko commented Aug 10, 2020

This one creates new make target "format" to execute formatting of python code.
Make sure to install yapf package with pip install yapf

sbysrc/sby.py Outdated
early_log(my_workdir, "Moving directory '{}' to '{}'.".format(my_workdir, "{}.bak{:03d}".format(my_workdir, backup_idx)))
early_log(
my_workdir, "Moving directory '{}' to '{}'.".format(my_workdir,
"{}.bak{:03d}".format(my_workdir, backup_idx)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these ways how it breaks long lines are really awkward. Are you sure this is an improvement?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

break is on 120 chars per line (same as in nextpnr c++ code), split of line have lot of configuration possibilities (check .style.yapf ) but agree some are even looking strange a standard way of formatting python.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

120 chars per line seems fine. I've tried playing around with the options but none of them seem to change anything for this line?

@mmicko
Copy link
Member Author

mmicko commented Jun 30, 2021

Removed commit that was applying of rules format source, so it is easier to apply this PR when time comes.

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

Successfully merging this pull request may close these issues.

None yet

2 participants