Page MenuHomePhabricator

global: remove redundant parenthesis
Needs RevisionPublic

Authored by indygreg on Nov 11 2017, 9:51 PM.

Details

Reviewers
yuja
Group Reviewers
hg-reviewers
Summary

My code editor was spewing several warnings for redundant
parenthesis. It supports easily fixing them. So I just did it
globally.

What redundant parenthesis are left are in 3rd party code or
are needed around string literals so our style checker doesn't
complain about the lack of _().

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Nov 11 2017, 9:51 PM
dlax added a subscriber: dlax.Nov 13 2017, 3:19 AM

LGTM modulo a few nits. Nice cleanup.

hgext/hgk.py
79

Why this extra indentation?

337

Spurious indentation changes here as well.

mercurial/bookmarks.py
319

I'd keep this one as it makes it clearer that we return a generator. Arguably, that's nitpicking.

yuja requested changes to this revision.Nov 13 2017, 8:47 AM
yuja added a subscriber: yuja.
yuja added inline comments.
mercurial/revsetlang.py
298

I don't like this sort of changes because here a tuple is a
data structure used thoroughly, not an arbitrary set of values
to be returned.

This revision now requires changes to proceed.Nov 13 2017, 8:47 AM

I used my editor's feature to fix violations. That's probably what introduced the whitespace changes. If only Mercurial conformed to PEP-8 style...