Skip to content

autopep8#51

Merged
mlautman merged 3 commits intokinetic-develfrom
pep8
Oct 19, 2018
Merged

autopep8#51
mlautman merged 3 commits intokinetic-develfrom
pep8

Conversation

@mlautman
Copy link
Copy Markdown
Member

Results of running
autopep8 --max-line-length 130 --in-place $1 on each .py file

@ghost ghost assigned mlautman Oct 16, 2018
@ghost ghost added the in progress label Oct 16, 2018
@mlautman mlautman requested a review from brawner October 16, 2018 23:39
if str(type(widget)).find(self.class_aliases.get(class_name, class_name)) < 0:
sys.modules['QtCore'].qDebug(str('PySide.loadUi(): could not find widget class "%s", defaulting to "%s"' % (class_name, type(widget))))
sys.modules['QtCore'].qDebug(
str('PySide.loadUi(): could not find widget class "%s", defaulting to "%s"' % (class_name, type(widget))))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't need to be converted to a string right?


if not QT_BINDING:
raise ImportError("Could not find Qt binding (looked for: %s):\n%s" % (', '.join(["'%s'" % b for b in binding_order]), '\n'.join(error_msgs)))
raise ImportError("Could not find Qt binding (looked for: %s):\n%s" %
Copy link
Copy Markdown
Contributor

@dirk-thomas dirk-thomas Oct 18, 2018

Choose a reason for hiding this comment

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

We prefer to wrap after the open parenthesis in order to make the following line "unaligned" and not depend on the content before the parenthesis, e.g.:

raise ImportError(
    "Could not find Qt binding (looked for: %s):\n%s" %
    (', '.join(["'%s'" % b for b in binding_order]), '\n'.join(error_msgs)))

@ghost ghost assigned dirk-thomas Oct 19, 2018
#loader = CustomUiLoader(baseinstance)
#custom_widgets = custom_widgets or {}
#for custom_widget in custom_widgets.values():
# for custom_widget in custom_widgets.values():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was wondering why only this line was affected but not the two lines above?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm really not sure about the internals of autopep8. It seems to consistently do about 95% of what you would hope it would do

@mlautman mlautman merged commit 287a3e3 into kinetic-devel Oct 19, 2018
@ghost ghost removed the in progress label Oct 19, 2018
@mlautman mlautman deleted the pep8 branch October 19, 2018 23:34
mlautman added a commit that referenced this pull request Oct 20, 2018
* autopep8

* wrap

* autopep8 fixup
mlautman pushed a commit that referenced this pull request Oct 26, 2018
* Modifying files for ros2

* Moving .cmake.em to .cmake

* Removing QtBindingHelper

* autopep8

* Adding tests

* autopep8 (#51)

* autopep8

* wrap

* autopep8 fixup

* Adding tests

* Reverting copyright

* Updating package.xml

* Cleaning up

* Updating package.xml

* Cmakelists

* package.xml

* tests working again

* package.xml

* package.xml

* package.xml

* package.xml

* package.xml

* package.xml

* package.xml

* package.xml

* cmakelists

* Updating cmake files to work with qt_gui_cpp

* Building and installing

* Reverting to original imports

* Pass flake8

* Removing install

* Moving python files back to src

* Addressing pull request

* Addressing pull request comments

* Cleaning up

* one import per line

* Addressing pull request comments

* comment case only
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