[PATCH] lib/*: exempt two core files from ungrouped-imports check

Aaron Bauman <[email protected]>
Newsgroups gmane.linux.gentoo.portage.devel
Message-ID <[email protected]>
* These will take some time to refactor/address if at all possible.
* Turn on ungrouped-imports check for entire repo

Signed-off-by: Aaron Bauman <[email protected]>
---
 lib/portage/__init__.py |  1 +
 lib/portage/checksum.py | 15 ++++++++-------
 pylintrc                |  1 +
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index 73bb1ed0d..916c93510 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -1,5 +1,6 @@
 # Copyright 1998-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
+# pylint: disable=ungrouped-imports
 
 VERSION = "HEAD"
 
diff --git a/lib/portage/checksum.py b/lib/portage/checksum.py
index d4a75c058..b5dae9672 100644
--- a/lib/portage/checksum.py
+++ b/lib/portage/checksum.py
@@ -1,20 +1,21 @@
 # checksum.py -- core Portage functionality
 # Copyright 1998-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
+# pylint: disable=ungrouped-imports
 
-import portage
-from portage.const import PRELINK_BINARY, HASHING_BLOCKSIZE
-from portage.localization import _
-from portage import os
-from portage import _encodings
-from portage import _unicode_decode, _unicode_encode
 import errno
 import functools
 import hashlib
+import portage
 import stat
 import subprocess
 import tempfile
 
+from portage import _encodings, _unicode_decode, _unicode_encode
+from portage import os
+from portage.const import HASHING_BLOCKSIZE, PRELINK_BINARY
+from portage.localization import _
+
 
 # Summary of all available hashes and their implementations,
 # most preferred first. Please keep this in sync with logic below.
@@ -32,7 +33,7 @@ import tempfile
 # SHA3_512: hashlib (3.6+), pysha3, pycrypto
 
 
-#dict of all available hash functions
+# Dict of all available hash functions
 hashfunc_map = {}
 hashorigin_map = {}
 
diff --git a/pylintrc b/pylintrc
index 9b0975329..f2aadf14f 100644
--- a/pylintrc
+++ b/pylintrc
@@ -28,6 +28,7 @@ enable=
         trailing-newlines,
         trailing-whitespace,
         unexpected-line-ending-format,
+        ungrouped-imports,
         unnecessary-semicolon,
         unused-import,
         useless-import-alias,
-- 
2.28.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.