Patchwork [3,of,6] check-code: remove redundant import style check

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 28, 2016, 5:35 a.m.
Message ID <5b26746f741f3818a9f7.1456637754@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/13442/
State Accepted
Headers show

Comments

Gregory Szorc - Feb. 28, 2016, 5:35 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1456636457 28800
#      Sat Feb 27 21:14:17 2016 -0800
# Node ID 5b26746f741f3818a9f7632b3130f618478e845a
# Parent  8f044924a7f8098fb524f0a43e708fe2590b6380
check-code: remove redundant import style check

We have a dedicated tool that checks for import conventions. Remove
a redundant and less powerful check.

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -213,19 +213,16 @@  utestfilters = [
 ]
 
 pypats = [
   [
     (r'^\s*def\s*\w+\s*\(.*,\s*\(',
      "tuple parameter unpacking not available in Python 3+"),
     (r'lambda\s*\(.*,.*\)',
      "tuple parameter unpacking not available in Python 3+"),
-    (r'import (.+,[^.]+\.[^.]+|[^.]+\.[^.]+,)',
-     '2to3 can\'t always rewrite "import qux, foo.bar", '
-     'use "import foo.bar" on its own line instead.'),
     (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"),
     (r'\breduce\s*\(.*', "reduce is not available in Python 3+"),
     (r'dict\(.*=', 'dict() is different in Py2 and 3 and is slower than {}',
      'dict-from-generator'),
     (r'\.has_key\b', "dict.has_key is not available in Python 3+"),
     (r'\s<>\s', '<> operator is not available in Python 3+, use !='),
     (r'^\s*\t', "don't use tabs"),
     (r'\S;\s*\n', "semicolon"),