Code review comment for lp://staging/~saviq/unity8/fix-flake8

Revision history for this message
Leo Arias (elopio) wrote :

Awesome, thanks saviq.

A couple of things:

46+ main_window = \
47+ unity_proxy.select_single(main_window_emulator.QQuickView)

This is correct, but people in python avoid the \ as much as possible. This is what they have recommended to me instead:

main_window = (
    unity_proxy.select_single(main_window_emulator.QQuickView))

I think it's uglier, but I do it for consistency. I won't complaint if you prefer the \ here.

322+ self.select_single(objectName="processingIndicator")\
323+ .visible.wait_for(False)

This should be split after the parenthesis, like:

self.select_single(
    objectName="processingIndicator").visible.wait_for(
        False)

or,

processing_indicator = self.select_single(objectName="processingIndicator")
processing_indicator.visible.wait_for(False)

I prefer using two statements.

495-from unity8.shell.emulators import tutorial # NOQA

This is needed, it populates the autopilot object registry, used to match QML elements to custom proxy objects. It has a comment in the line before mentioning that. The # NOQA should take care of the flake8 error.

Needs fixing, because that last removed import will make the tests fail.

review: Needs Fixing

« Back to merge proposal