Mercurial > hg
changeset 25578:4b1ec70b9713
match: join two nested if-blocks
Instead of
if a:
if b:
return False
let's write it
if a and b:
return False
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 31 May 2015 13:17:41 -0700 |
parents | a410479c7ee7 |
children | b76410eed482 |
files | mercurial/match.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/match.py Wed May 27 11:47:55 2015 -0700 +++ b/mercurial/match.py Sun May 31 13:17:41 2015 -0700 @@ -226,10 +226,10 @@ return False if (self._includeroots and dir not in self._includeroots and - dir not in self._includedirs): - if not any(parent in self._includeroots - for parent in util.finddirs(dir)): - return False + dir not in self._includedirs and + not any(parent in self._includeroots + for parent in util.finddirs(dir))): + return False return (not self._fileroots or '.' in self._fileroots or dir in self._fileroots or