Skip to content

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

Closed
wants to merge 2 commits into from
Closed

Apply autopep8 for formatting #40

wants to merge 2 commits into from

Conversation

matiasilva
Copy link

Also closes #31

pico_project.py Outdated
Comment on lines 439 to 440
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)
Copy link
Contributor

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')
Copy link
Contributor

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? 🤷

Copy link
Author

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

Comment on lines 1269 to 1271
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'
Copy link
Contributor

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)

Copy link
Author

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.

@JamesH65
Copy link
Contributor

JamesH65 commented Sep 2, 2021

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.

@matiasilva matiasilva closed this by deleting the head repository Feb 22, 2024
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.

3 participants