-
Notifications
You must be signed in to change notification settings - Fork 80
Apply autopep8 for formatting #40
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
Conversation
pico_project.py
Outdated
ttk.Label(self, text="Select the advanced options you wish to enable or change. \ | ||
Note that you really should understand the implications of changing these items before using them!").grid(row=0, column=0, columnspan=5) |
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.
You need to be careful here 😉
>>> mystr = "this is a string \
... split over two lines"
>>> mystr
'this is a string split over two lines'
y = mb.askquestion('Raspberry Pi Pico Project Generator', 'There already appears to be a project in this folder. \nPress Yes to overwrite project files, or Cancel to chose another folder') | ||
y = mb.askquestion( | ||
'Raspberry Pi Pico Project Generator', | ||
'There already appears to be a project in this folder. \nPress Yes to overwrite project files, or Cancel to chose another folder') |
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.
Does this also go over your maximum line length? 🤷
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.
I've set my max line length at 120 chars. I think it does go over in this case
m = 'Unable to find the `' + COMPILER_NAME + '` compiler\n' | ||
m +='You will need to install an appropriate compiler to build a Raspberry Pi Pico project\n' | ||
m += 'You will need to install an appropriate compiler to build a Raspberry Pi Pico project\n' | ||
m += 'See the Raspberry Pi Pico documentation for how to do this on your particular platform\n' |
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.
I'll leave it up to you to decide whether it comes within the scope of this PR or not, but note that you could also do this with a triple-quoted string e.g.
m = '''Unable to find the `{}` compiler
You will need to install an appropriate compiler to build a Raspberry Pi Pico project
See the Raspberry Pi Pico documentation for how to do this on your particular platform
'''.format(COMPILER_NAME)
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.
These strings could potentially be pulled out into a separate file, but yes probably best for another PR.
Bugger, already merged the template change, think this one should have gone first. I pressume its just a matter of running the pep8 code formatter over the files, so might close this and do it again on the latest tree once the rest of the code has been merged. |
Also closes #31