Browse Source

Merge "Fix ignore_path_errors call in main"

tags/0.8.0
Jenkins 2 years ago
parent
commit
711bac3c76
1 changed files with 6 additions and 7 deletions
  1. 6
    7
      doc8/main.py

+ 6
- 7
doc8/main.py View File

@@ -346,13 +346,12 @@ def main():
346 346
     args['ignore_path'].extend(cfg.pop('ignore_path', []))
347 347
 
348 348
     cfg.setdefault('ignore_path_errors', {})
349
-    for tmp_ignore_path_error in args.pop('ignore_path_errors', []):
350
-        tmp_ignores = parse_ignore_path_errors(tmp_ignore_path_error)
351
-        for path, ignores in six.iteritems(tmp_ignores):
352
-            if path in cfg['ignore_path_errors']:
353
-                cfg['ignore_path_errors'][path].update(ignores)
354
-            else:
355
-                cfg['ignore_path_errors'][path] = set(ignores)
349
+    tmp_ignores = parse_ignore_path_errors(args.pop('ignore_path_errors', []))
350
+    for path, ignores in six.iteritems(tmp_ignores):
351
+        if path in cfg['ignore_path_errors']:
352
+            cfg['ignore_path_errors'][path].update(ignores)
353
+        else:
354
+            cfg['ignore_path_errors'][path] = set(ignores)
356 355
 
357 356
     args.update(cfg)
358 357
     setup_logging(args.get('verbose'))

Loading…
Cancel
Save