summaryrefslogtreecommitdiffstats
path: root/subcmds/grep.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-11-14 12:09:38 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2012-11-14 12:09:38 +0900
commit8f62fb7bd305337994bced7d23b347d0d39f5faf (patch)
tree7a00915a4e6138fe2c12d6f8d181b623df8962a2 /subcmds/grep.py
parentc1b86a232383748811c6faf17f364e63e10f7dd4 (diff)
downloadgit-repo-8f62fb7bd305337994bced7d23b347d0d39f5faf.tar.gz
Tidy up code formatting a bit more
Enable the following Pylint warnings: C0322: Operator not preceded by a space C0323: Operator not followed by a space C0324: Comma not followed by a space And make the necessary fixes. Change-Id: I74d74283ad5138cbaf28d492b18614eb355ff9fe
Diffstat (limited to 'subcmds/grep.py')
-rw-r--r--subcmds/grep.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/subcmds/grep.py b/subcmds/grep.py
index fa5f8765..dd391cfa 100644
--- a/subcmds/grep.py
+++ b/subcmds/grep.py
@@ -85,7 +85,7 @@ contain a line that matches both expressions:
85 g.add_option('--cached', 85 g.add_option('--cached',
86 action='callback', callback=carry, 86 action='callback', callback=carry,
87 help='Search the index, instead of the work tree') 87 help='Search the index, instead of the work tree')
88 g.add_option('-r','--revision', 88 g.add_option('-r', '--revision',
89 dest='revision', action='append', metavar='TREEish', 89 dest='revision', action='append', metavar='TREEish',
90 help='Search TREEish, instead of the work tree') 90 help='Search TREEish, instead of the work tree')
91 91
@@ -97,7 +97,7 @@ contain a line that matches both expressions:
97 g.add_option('-i', '--ignore-case', 97 g.add_option('-i', '--ignore-case',
98 action='callback', callback=carry, 98 action='callback', callback=carry,
99 help='Ignore case differences') 99 help='Ignore case differences')
100 g.add_option('-a','--text', 100 g.add_option('-a', '--text',
101 action='callback', callback=carry, 101 action='callback', callback=carry,
102 help="Process binary files as if they were text") 102 help="Process binary files as if they were text")
103 g.add_option('-I', 103 g.add_option('-I',
@@ -126,7 +126,7 @@ contain a line that matches both expressions:
126 g.add_option('--and', '--or', '--not', 126 g.add_option('--and', '--or', '--not',
127 action='callback', callback=carry, 127 action='callback', callback=carry,
128 help='Boolean operators to combine patterns') 128 help='Boolean operators to combine patterns')
129 g.add_option('-(','-)', 129 g.add_option('-(', '-)',
130 action='callback', callback=carry, 130 action='callback', callback=carry,
131 help='Boolean operator grouping') 131 help='Boolean operator grouping')
132 132
@@ -146,10 +146,10 @@ contain a line that matches both expressions:
146 action='callback', callback=carry, 146 action='callback', callback=carry,
147 metavar='CONTEXT', type='str', 147 metavar='CONTEXT', type='str',
148 help='Show CONTEXT lines after match') 148 help='Show CONTEXT lines after match')
149 g.add_option('-l','--name-only','--files-with-matches', 149 g.add_option('-l', '--name-only', '--files-with-matches',
150 action='callback', callback=carry, 150 action='callback', callback=carry,
151 help='Show only file names containing matching lines') 151 help='Show only file names containing matching lines')
152 g.add_option('-L','--files-without-match', 152 g.add_option('-L', '--files-without-match',
153 action='callback', callback=carry, 153 action='callback', callback=carry,
154 help='Show only file names not containing matching lines') 154 help='Show only file names not containing matching lines')
155 155
@@ -158,9 +158,9 @@ contain a line that matches both expressions:
158 out = GrepColoring(self.manifest.manifestProject.config) 158 out = GrepColoring(self.manifest.manifestProject.config)
159 159
160 cmd_argv = ['grep'] 160 cmd_argv = ['grep']
161 if out.is_on and git_require((1,6,3)): 161 if out.is_on and git_require((1, 6, 3)):
162 cmd_argv.append('--color') 162 cmd_argv.append('--color')
163 cmd_argv.extend(getattr(opt,'cmd_argv',[])) 163 cmd_argv.extend(getattr(opt, 'cmd_argv', []))
164 164
165 if '-e' not in cmd_argv: 165 if '-e' not in cmd_argv:
166 if not args: 166 if not args: