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

autopep8 #19

Merged
merged 1 commit into from
Oct 23, 2018
Merged

autopep8 #19

merged 1 commit into from
Oct 23, 2018

Conversation

mlautman
Copy link
Member

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

@mlautman mlautman requested a review from brawner October 16, 2018 23:41
+ [action_prefix + ACTION_TOPICS_SUFFIX for (action_prefix, _) in action_nodes.items()]
+ [image_prefix + IMAGE_TOPICS_SUFFIX for (image_prefix, _) in image_nodes.items()]
+ nn_nodes if nn_nodes is not None else [],
+ [action_prefix + ACTION_TOPICS_SUFFIX for (action_prefix, _) in action_nodes.items()]
Copy link

Choose a reason for hiding this comment

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

This list should probably not be built inside the call to _populate_node_graph

@@ -331,7 +344,8 @@ def _redraw_graph_view(self):

def _load_dot(self, file_name=None):
if file_name is None:
file_name, _ = QFileDialog.getOpenFileName(self._widget, self.tr('Open graph from file'), None, self.tr('DOT graph (*.dot)'))
file_name, _ = QFileDialog.getOpenFileName(self._widget, self.tr(
'Open graph from file'), None, self.tr('DOT graph (*.dot)'))
Copy link

Choose a reason for hiding this comment

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

This line break is confusing

@@ -363,7 +377,8 @@ def _fit_in_view(self):
self._widget.graphics_view.fitInView(self._scene.itemsBoundingRect(), Qt.KeepAspectRatio)

def _save_dot(self):
file_name, _ = QFileDialog.getSaveFileName(self._widget, self.tr('Save as DOT'), 'rosgraph.dot', self.tr('DOT graph (*.dot)'))
file_name, _ = QFileDialog.getSaveFileName(self._widget, self.tr(
'Save as DOT'), 'rosgraph.dot', self.tr('DOT graph (*.dot)'))
Copy link

Choose a reason for hiding this comment

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

Line break is confusing

@@ -375,7 +390,8 @@ def _save_dot(self):
handle.close()

def _save_svg(self):
file_name, _ = QFileDialog.getSaveFileName(self._widget, self.tr('Save as SVG'), 'rosgraph.svg', self.tr('Scalable Vector Graphic (*.svg)'))
file_name, _ = QFileDialog.getSaveFileName(self._widget, self.tr(
'Save as SVG'), 'rosgraph.svg', self.tr('Scalable Vector Graphic (*.svg)'))
Copy link

Choose a reason for hiding this comment

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

bad line break

@@ -389,7 +405,8 @@ def _save_svg(self):
painter.end()

def _save_image(self):
file_name, _ = QFileDialog.getSaveFileName(self._widget, self.tr('Save as image'), 'rosgraph.png', self.tr('Image (*.bmp *.jpg *.png *.tiff)'))
file_name, _ = QFileDialog.getSaveFileName(self._widget, self.tr(
'Save as image'), 'rosgraph.png', self.tr('Image (*.bmp *.jpg *.png *.tiff)'))
Copy link

Choose a reason for hiding this comment

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

bad line break

)
edges,
node_connections,
True, # hide_single_connection_topics,
Copy link

Choose a reason for hiding this comment

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

use a named parameter

edges,
node_connections,
True, # hide_single_connection_topics,
False # hide_dead_end_topics
Copy link

Choose a reason for hiding this comment

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

use a named parameter instead of a comment

)
edges,
node_connections,
False, # hide_single_connection_topics,
Copy link

Choose a reason for hiding this comment

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

named parameters

)
edges,
node_connections,
True, # hide_single_connection_topics,
Copy link

Choose a reason for hiding this comment

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

named parameters

@mlautman
Copy link
Member Author

@brawner all good?

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.

2 participants