fix pylint configuration 08/92408/5
authorguillaume.lambert <guillaume.lambert@orange.com>
Fri, 4 Sep 2020 08:52:02 +0000 (10:52 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Fri, 18 Sep 2020 14:32:28 +0000 (16:32 +0200)
- modify the method regex used:
  Tests methods name are commonly above the default limit of 32 char.
  They also use capital letters here to abide by the OpenROADM and WDM
  naming conventions.
- modify the variable regex used:
  It was supporting by default only the snake case and reported
  camel case variables as errors.
  Variable names also use capital letters here to abide by the OpenROADM
  and WDM naming conventions.
- disable the no-member check (inline):
  it reports many false positives since pylint is unable to retrieve
  the HTTP return codes given in the request package dictionary
- disable the too-many-public-methods check (inline):
  it reports many false positives since unittests requires many public
  methods

JIRA: TRNSPRTPCE-320
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I21686442628591fd2c4af5182dc9f438e5701cb2

21 files changed:
tests/transportpce_tests/1.2.1/test_end2end.py
tests/transportpce_tests/1.2.1/test_gnpy.py
tests/transportpce_tests/1.2.1/test_olm.py
tests/transportpce_tests/1.2.1/test_pce.py
tests/transportpce_tests/1.2.1/test_portmapping.py
tests/transportpce_tests/1.2.1/test_renderer_service_path_nominal.py
tests/transportpce_tests/1.2.1/test_topoPortMapping.py
tests/transportpce_tests/1.2.1/test_topology.py
tests/transportpce_tests/2.2.1/test_end2end.py
tests/transportpce_tests/2.2.1/test_olm.py
tests/transportpce_tests/2.2.1/test_otn_end2end.py
tests/transportpce_tests/2.2.1/test_otn_renderer.py
tests/transportpce_tests/2.2.1/test_otn_sh_renderer.py
tests/transportpce_tests/2.2.1/test_otn_topology.py
tests/transportpce_tests/2.2.1/test_portmapping.py
tests/transportpce_tests/2.2.1/test_renderer_service_path_nominal.py
tests/transportpce_tests/2.2.1/test_tapi.py
tests/transportpce_tests/2.2.1/test_topoPortMapping.py
tests/transportpce_tests/2.2.1/test_topology.py
tests/transportpce_tests/common/test_utils.py
tox.ini

index dd0c9bd17a292965e33b16f846552113aabba35e..7854f06fc45024ec3e3604f9dfc1d90545ef1ea4 100644 (file)
@@ -8,6 +8,8 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
 
 import json
 import time
index 20e7d7578a63cfa44f1972cc85932177db8e8140..de8e19f2a8c7bc12df11e2cf2657d740546d25f8 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import json
 import os
index b0711ab1b8767aafd3c127be03882bfb6a01c66b..3315a049eed551098445b4eca0ffa23d1bffcbc9 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 #############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import json
index 00aab10de22aa02ae3a1996dfc4489b7a40feba0..4b4443bed23b8ac23b1d6f659a84a18446f55d26 100644 (file)
@@ -8,6 +8,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import json
 import os
index 861d88098bfc93476f7fe83189cacc1d1fcdbf84..6024ca2366cce4f0a2f632c2920e9472b22372f7 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import requests
index dbf11a074addba0b13ddefb41f8d9204dab8740b..33b0f3ceccb5657182da7a9bfbc8966a07c83246 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 #############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import json
 import time
index 1c3ef934c80864f6871d966a06fa00bc759d6b81..f1a460103811268d2b8a0c48bbfb7aecbc2ccdd7 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import time
 import unittest
 import requests
index ab9419def459e1fc99eed77afc69cc22fd41bee7..87423ca6eda613c53121ac6d964b6b62f73d8908 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import json
 import time
 import unittest
index f5013e09327332e9aedf7e81459ae550c2ba7b23..e45603b6826fa2e8239bcabd67f430aa278d47fe 100644 (file)
@@ -8,6 +8,8 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
 
 import unittest
 import json
index c470283e21c4af12fbad31f49b423b083bf88654..a09a1e65ff6251c18d7d13c008b8caf061762735 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 #############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import json
index ffda6a582e0ad182de832d5f6c71e8355c5e310f..2d2e4f46d9a3458c164ea31552b39b1ac9bd805f 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import requests
index 35262a5f589c6390bb8a2c0acab132d400aa71c6..f4ec82795db6825f61a06004d1676c2559b6528c 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import json
 import time
index 2ec03efa73c69322008038550595d53e11a9ca89..be4c5e7a71d851fef07bdd8b552f9bb78244c973 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import requests
index 91045e501d20e89bb31baaf9b02abfa1a8dabe37..e4f5c8d6865b8c3ea715cfb0d7c4ce5ed0d3c57a 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import logging
index ddc4d0b0616007f89bc2f1c553ec4a567e08b160..58db3fca60837816b1bd523fe2614d569ea9b880 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import requests
index 29b0789da3ee7a5336d893800d230008e8435811..e59de8c8d8323efb5495b889e2f153eda4b368a6 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 #############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import json
 #from unittest.result import failfast
index 01c99fb8835ef130872f93b7ee4a5c896310ae83..9622da91b64f258a80e5f085190874a9b5657036 100644 (file)
@@ -7,6 +7,10 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
+
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import os
 import sys
 import time
index d60aac9b472c52a5a9b39462eab1ba003c14b825..14e258d553d16c8a358a30464815a8757cce563f 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import json
 import time
index c90f0a4308531001523f0e32feea825c10c99f57..0d3bb206bad5ec57d74d3aefc4949d2fac100bc2 100644 (file)
@@ -9,6 +9,9 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
+# pylint: disable=no-member
+# pylint: disable=too-many-public-methods
+
 import unittest
 import time
 import json
index ee5df6997116f5a0f9a2036559be53748879971a..822aab06f8f6d8b8e7af4ee38361951221b4ce33 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+
 ##############################################################################
 # Copyright (c) 2020 Orange, Inc. and others.  All rights reserved.
 #
@@ -7,6 +8,9 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
+
+# pylint: disable=no-member
+
 import json
 import os
 import sys
diff --git a/tox.ini b/tox.ini
index 6aee9f78424503bde276259f9fc4bc126846f87a..eee1ad8d4fa8032b1d6c6b76009892404ab5f9a4 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -84,4 +84,4 @@ basepython = python3
 deps = pylint
 whitelist_externals = find
 commands =
-    find transportpce_tests/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring  --reports=y --score=y  --output-format=colorized  \{\} +
+    find transportpce_tests/ -name *.py -exec pylint --max-line-length=120 --disable=missing-docstring --method-rgx="(([a-z_][a-zA-Z0-9_]{2,})|(_[a-z0-9_]*)|(__[a-zA-Z][a-zA-Z0-9_]+__))$" --variable-rgx="[a-zA-Z_][a-zA-Z0-9_]{1,30}$" --reports=y --score=y  --output-format=colorized  \{\} +