Browse Source

Merge "Use list of FILE_PATTERNS as default for --extension"

Jenkins 4 years ago
parent
commit
83c934fe34
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      doc8/main.py

+ 1
- 3
doc8/main.py View File

@@ -184,7 +184,7 @@ def main():
184 184
                         metavar="extension",
185 185
                         help="check file extensions of the given type"
186 186
                              " (default: %s)" % ", ".join(FILE_PATTERNS),
187
-                        default=[])
187
+                        default=list(FILE_PATTERNS))
188 188
     parser.add_argument("-v", "--verbose", dest="verbose", action='store_true',
189 189
                         help="run in verbose mode", default=False)
190 190
     parser.add_argument("--version", dest="version", action='store_true',
@@ -201,8 +201,6 @@ def main():
201 201
     args['extension'].extend(cfg.pop('extension', []))
202 202
     args['ignore_path'].extend(cfg.pop('ignore_path', []))
203 203
     args.update(cfg)
204
-    if not args.get('extension'):
205
-        args['extension'] = list(FILE_PATTERNS)
206 204
     setup_logging(args.get('verbose'))
207 205
 
208 206
     print("Scanning...")

Loading…
Cancel
Save