Browse Source

Improve help options

Capitalize help strings and end with "." to follow best practice from
other tools. Also improve some strings.

Change-Id: I7005f4a187385096d6a9c1e5cb1322ba76048a1c
Andreas Jaeger 4 years ago
parent
commit
83de2e6912
1 changed files with 15 additions and 15 deletions
  1. 15
    15
      doc8/main.py

+ 15
- 15
doc8/main.py View File

@@ -155,40 +155,40 @@ def main():
155 155
         formatter_class=argparse.RawDescriptionHelpFormatter)
156 156
     default_configs = ", ".join(CONFIG_FILENAMES)
157 157
     parser.add_argument("paths", metavar='path', type=str, nargs='*',
158
-                        help=("path to scan for doc files"
159
-                              " (default: os.getcwd())"),
158
+                        help=("Path to scan for doc files"
159
+                              " (default: current directory)."),
160 160
                         default=[os.getcwd()])
161 161
     parser.add_argument("--config", metavar='path', action="append",
162
-                        help="user config file location"
163
-                             " (default: %s)" % default_configs,
162
+                        help="User config file location"
163
+                             " (default: %s)." % default_configs,
164 164
                         default=[])
165 165
     parser.add_argument("--allow-long-titles", action="store_true",
166
-                        help="allow long section titles (default: False)",
166
+                        help="Allow long section titles (default: False).",
167 167
                         default=False)
168 168
     parser.add_argument("--ignore", action="append", metavar="code",
169
-                        help="ignore the given errors code/codes",
169
+                        help="Ignore the given error code(s).",
170 170
                         type=split_set_type,
171 171
                         default=[])
172 172
     parser.add_argument("--no-sphinx", action="store_false",
173
-                        help="do not ignore sphinx specific false positives",
173
+                        help="Do not ignore sphinx specific false positives.",
174 174
                         default=True, dest='sphinx')
175 175
     parser.add_argument("--ignore-path", action="append", default=[],
176
-                        help="ignore the given directory or file (globs"
177
-                             " are supported)", metavar='path')
176
+                        help="Ignore the given directory or file (globs"
177
+                             " are supported).", metavar='path')
178 178
     parser.add_argument("--max-line-length", action="store", metavar="int",
179 179
                         type=int,
180
-                        help="maximum allowed line"
181
-                             " length (default: %s)" % MAX_LINE_LENGTH,
180
+                        help="Maximum allowed line"
181
+                             " length (default: %s)." % MAX_LINE_LENGTH,
182 182
                         default=MAX_LINE_LENGTH)
183 183
     parser.add_argument("-e", "--extension", action="append",
184 184
                         metavar="extension",
185
-                        help="check file extensions of the given type"
186
-                             " (default: %s)" % ", ".join(FILE_PATTERNS),
185
+                        help="Check file extensions of the given type"
186
+                             " (default: %s)." % ", ".join(FILE_PATTERNS),
187 187
                         default=list(FILE_PATTERNS))
188 188
     parser.add_argument("-v", "--verbose", dest="verbose", action='store_true',
189
-                        help="run in verbose mode", default=False)
189
+                        help="Run in verbose mode.", default=False)
190 190
     parser.add_argument("--version", dest="version", action='store_true',
191
-                        help="show the version and exit", default=False)
191
+                        help="Show the version and exit.", default=False)
192 192
     args = vars(parser.parse_args())
193 193
     if args.get('version'):
194 194
         print(version.version_string())

Loading…
Cancel
Save