From f12cf6d55761cff8ccace12fe32c8f0e7f895a82 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Fri, 4 Nov 2016 17:05:39 +0000 Subject: [PATCH] statedetect: pylint and dependencies fixes - Corrected the depency for opencv bindings. Even though the library is imported as "cv2", the package containing it is called "opencv-python". - pylint: ignore no-member warnings; cv2 pulls it's memebers dynamically from the underlying libopencv, so pylint can't see them. --- setup.py | 2 +- wlauto/utils/statedetect.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e28ec7d2..82b39795 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,7 @@ params = dict( ], extras_require={ 'other': ['jinja2', 'pandas>=0.13.1'], - 'statedetect': ['numpy', 'imutils', 'cv2'], + 'statedetect': ['numpy', 'imutils', 'opencv-python'], 'test': ['nose'], 'mongodb': ['pymongo'], 'notify': ['notify2'], diff --git a/wlauto/utils/statedetect.py b/wlauto/utils/statedetect.py index 7ce4b2c4..dc32affa 100755 --- a/wlauto/utils/statedetect.py +++ b/wlauto/utils/statedetect.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# pylint: disable=no-member """ @@ -20,7 +21,7 @@ Requires a 'statedetection' directory in the workload directory that includes th and the 'templates' folder with PNGs of all templates mentioned in the yaml file. Requires the following Python libraries: -numpy, pyyaml (yaml), imutils and opencv (cv2) +numpy, pyyaml (yaml), imutils and opencv-python """