Gentoo Archives: gentoo-portage-dev

From: Aaron Bauman <bman@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Aaron Bauman <bman@g.o>
Subject: [gentoo-portage-dev] [PATCH] lib/*: exempt two core files from ungrouped-imports check
Date: Fri, 07 Aug 2020 00:03:41
Message-Id: 20200807000331.1978868-1-bman@gentoo.org
1 * These will take some time to refactor/address if at all possible.
2 * Turn on ungrouped-imports check for entire repo
3
4 Signed-off-by: Aaron Bauman <bman@g.o>
5 ---
6 lib/portage/__init__.py | 1 +
7 lib/portage/checksum.py | 15 ++++++++-------
8 pylintrc | 1 +
9 3 files changed, 10 insertions(+), 7 deletions(-)
10
11 diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
12 index 73bb1ed0d..916c93510 100644
13 --- a/lib/portage/__init__.py
14 +++ b/lib/portage/__init__.py
15 @@ -1,5 +1,6 @@
16 # Copyright 1998-2020 Gentoo Authors
17 # Distributed under the terms of the GNU General Public License v2
18 +# pylint: disable=ungrouped-imports
19
20 VERSION = "HEAD"
21
22 diff --git a/lib/portage/checksum.py b/lib/portage/checksum.py
23 index d4a75c058..b5dae9672 100644
24 --- a/lib/portage/checksum.py
25 +++ b/lib/portage/checksum.py
26 @@ -1,20 +1,21 @@
27 # checksum.py -- core Portage functionality
28 # Copyright 1998-2020 Gentoo Authors
29 # Distributed under the terms of the GNU General Public License v2
30 +# pylint: disable=ungrouped-imports
31
32 -import portage
33 -from portage.const import PRELINK_BINARY, HASHING_BLOCKSIZE
34 -from portage.localization import _
35 -from portage import os
36 -from portage import _encodings
37 -from portage import _unicode_decode, _unicode_encode
38 import errno
39 import functools
40 import hashlib
41 +import portage
42 import stat
43 import subprocess
44 import tempfile
45
46 +from portage import _encodings, _unicode_decode, _unicode_encode
47 +from portage import os
48 +from portage.const import HASHING_BLOCKSIZE, PRELINK_BINARY
49 +from portage.localization import _
50 +
51
52 # Summary of all available hashes and their implementations,
53 # most preferred first. Please keep this in sync with logic below.
54 @@ -32,7 +33,7 @@ import tempfile
55 # SHA3_512: hashlib (3.6+), pysha3, pycrypto
56
57
58 -#dict of all available hash functions
59 +# Dict of all available hash functions
60 hashfunc_map = {}
61 hashorigin_map = {}
62
63 diff --git a/pylintrc b/pylintrc
64 index 9b0975329..f2aadf14f 100644
65 --- a/pylintrc
66 +++ b/pylintrc
67 @@ -28,6 +28,7 @@ enable=
68 trailing-newlines,
69 trailing-whitespace,
70 unexpected-line-ending-format,
71 + ungrouped-imports,
72 unnecessary-semicolon,
73 unused-import,
74 useless-import-alias,
75 --
76 2.28.0

Replies