Browse Source

pylint: merge config files; dev env: upgrade pylint to v2.14.0

Fabian Peter Hammerle 1 year ago
parent
commit
88ccd4f62d
6 changed files with 37 additions and 34 deletions
  1. 21 2
      .pylintrc
  2. 10 3
      Pipfile.lock
  3. 3 2
      dlinfo/__init__.py
  4. 2 2
      dlinfo/_glibc.py
  5. 1 1
      dlinfo/_macosx.py
  6. 0 24
      tests/.pylintrc

+ 21 - 2
.pylintrc

@@ -1,4 +1,23 @@
+[MASTER]
+
+load-plugins=pylint.extensions.check_elif,
+             pylint.extensions.comparison_placement,
+             pylint.extensions.confusing_elif,
+             pylint.extensions.consider_ternary_expression,
+             pylint.extensions.emptystring,
+             pylint.extensions.eq_without_hash,
+             pylint.extensions.for_any_all,
+             pylint.extensions.mccabe,
+             pylint.extensions.no_self_use,
+             pylint.extensions.overlapping_exceptions,
+             pylint.extensions.private_import,
+             pylint.extensions.redefined_loop_name,
+             pylint.extensions.redefined_variable_type,
+             pylint.extensions.set_membership,
+             pylint.extensions.typing
+
 [MESSAGES CONTROL]
 
-disable=missing-docstring,
-        too-few-public-methods
+disable=consider-alternative-union-syntax, # requires python>=3.10
+        deprecated-typing-alias, # requires python>=3.9, e.g. for dict[...]
+        missing-docstring

+ 10 - 3
Pipfile.lock

@@ -208,11 +208,11 @@
         },
         "pylint": {
             "hashes": [
-                "sha256:095567c96e19e6f57b5b907e67d265ff535e588fe26b12b5ebe1fc5645b2c731",
-                "sha256:705c620d388035bdd9ff8b44c5bcdd235bfb49d276d488dd2c8ff1736aa42526"
+                "sha256:10d291ea5133645f73fc1b51ca137ad6531223c1461a5632a1db029a9bc033b5",
+                "sha256:ef64ce5d4c17b8906caeaf2c2914ef3036a3a1b7f4a86f5fbf6caff9067c5f63"
             ],
             "index": "pypi",
-            "version": "==2.13.9"
+            "version": "==2.14.0"
         },
         "pyparsing": {
             "hashes": [
@@ -254,6 +254,13 @@
             "markers": "python_version < '3.11'",
             "version": "==2.0.1"
         },
+        "tomlkit": {
+            "hashes": [
+                "sha256:0f4050db66fd445b885778900ce4dd9aea8c90c4721141fde0d6ade893820ef1",
+                "sha256:71ceb10c0eefd8b8f11fe34e8a51ad07812cb1dc3de23247425fbc9ddc47b9dd"
+            ],
+            "version": "==0.11.0"
+        },
         "typing-extensions": {
             "hashes": [
                 "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42",

+ 3 - 2
dlinfo/__init__.py

@@ -2,7 +2,8 @@ __all__ = ['DLInfo']
 
 import sys
 
+# pylint: disable=import-private-name; internal
 if sys.platform == 'darwin':
-    from ._macosx import DLInfo
+    from dlinfo._macosx import DLInfo
 else:
-    from ._glibc import DLInfo
+    from dlinfo._glibc import DLInfo

+ 2 - 2
dlinfo/_glibc.py

@@ -6,7 +6,7 @@ import sys
 _RTLD_DI_LINKMAP = 2
 
 
-class _LinkMap(ctypes.Structure):
+class _LinkMap(ctypes.Structure):  # pylint: disable=too-few-public-methods
     # link.h
     _fields_ = [
         ('l_addr', ctypes.c_void_p),
@@ -23,7 +23,7 @@ _DLINFO.argtypes = ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p
 _DLINFO.restype = ctypes.c_int
 
 
-class DLInfo:
+class DLInfo:  # pylint: disable=too-few-public-methods
 
     """
     >>> lib = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))

+ 1 - 1
dlinfo/_macosx.py

@@ -3,7 +3,7 @@ import ctypes
 from ctypes.macholib.dyld import dyld_find
 
 
-class DLInfo:
+class DLInfo:  # pylint: disable=too-few-public-methods
 
     """
     >>> lib = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))

+ 0 - 24
tests/.pylintrc

@@ -1,24 +0,0 @@
-[MASTER]
-
-load-plugins=pylint.extensions.check_elif,
-             pylint.extensions.comparison_placement,
-             pylint.extensions.confusing_elif,
-             pylint.extensions.consider_ternary_expression,
-             pylint.extensions.emptystring,
-             pylint.extensions.eq_without_hash,
-             pylint.extensions.for_any_all,
-             pylint.extensions.mccabe,
-             pylint.extensions.no_self_use,
-             pylint.extensions.overlapping_exceptions,
-             pylint.extensions.private_import,
-             pylint.extensions.redefined_loop_name,
-             pylint.extensions.redefined_variable_type,
-             pylint.extensions.set_membership,
-             pylint.extensions.typing
-
-[MESSAGES CONTROL]
-
-disable=consider-alternative-union-syntax, # requires python>=3.10
-        deprecated-typing-alias, # requires python>=3.9, e.g. for dict[...]
-        missing-docstring,
-        redefined-outer-name