Skip to content

Convert messages to f-strings and overides to list + other minor edits #23

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bergamote
Copy link

Hi, your script is very useful! Reading through it I thought that some parts could be made a bit more readable so here's what I did:

  • Added a header line variable h_line = 80 * "#" since it was used often
  • Converted the printed messages to triple quoted f-strings, since the code has the same 80 char limit as the terminal it makes them easier to read and to edit in the future
  • Converted blendfile_override_setting from a string to a list that is then joined before being written to file, again for readability but also because it's recommended in PEP 8
  • Added a standard cancel key "C", which is then changed to "BREAK" for Windows
  • Removed pathlib import Path since we already import os we can use os.path.exists()
  • Changed some simple expressions and fixed a few typos (very little)

I paid attention to not change the script's output or touch any of the functionalities, so apart from a couple of messages where I had to move a line break by a word or two, everything should be exactly the same from the user point of view.

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.

1 participant