코드 정적분석_Python_2019_06_07 - lge-robot-navi/Multi-modal-Sensor-based-System GitHub Wiki

************* Module nightvision_grabber

nightvision_grabber.py:4:15: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:5:11: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:6:16: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:7:13: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:8:18: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:18:27: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:20:12: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:21:15: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:23:21: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:25:9: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:29:39: C0326: Exactly one space required after comma camera.set(cv2.CAP_PROP_FRAME_WIDTH, 720) ^ (bad-whitespace) nightvision_grabber.py:32:17: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:41:19: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:51:0: C0325: Unnecessary parens after 'while' keyword (superfluous-parens) nightvision_grabber.py:60:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:83:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:97:21: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:107:24: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:116:58: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:122:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:126:30: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:128:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:130:35: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:133:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_grabber.py:147:0: C0301: Line too long (104/100) (line-too-long) nightvision_grabber.py:149:0: C0301: Line too long (104/100) (line-too-long) nightvision_grabber.py:1:0: C0111: Missing module docstring (missing-docstring) nightvision_grabber.py:12:0: C0103: Constant name "exclude_path" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:16:0: E0401: Unable to import 'cv2' (import-error) nightvision_grabber.py:16:0: C0413: Import "import cv2" should be placed at the top of the module (wrong-import-position) nightvision_grabber.py:18:0: E0401: Unable to import 'memsync' (import-error) nightvision_grabber.py:18:0: C0413: Import "from memsync import MemSync" should be placed at the top of the module (wrong-import-position) nightvision_grabber.py:21:0: C0103: Constant name "nv_frame" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:22:0: C0103: Constant name "thread_lock" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:23:0: C0103: Constant name "thread_running" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:24:0: C0103: Constant name "main_running" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:25:0: C0103: Constant name "mc" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:27:0: C0103: Function name "initVideoDevice" doesn't conform to snake_case naming style (invalid-name) nightvision_grabber.py:27:0: C0111: Missing function docstring (missing-docstring) nightvision_grabber.py:34:0: C0103: Function name "grabVideoFrame" doesn't conform to snake_case naming style (invalid-name) nightvision_grabber.py:34:0: C0111: Missing function docstring (missing-docstring) nightvision_grabber.py:40:0: C0103: Function name "threadprocGrabFrame" doesn't conform to snake_case naming style (invalid-name) nightvision_grabber.py:40:0: C0111: Missing function docstring (missing-docstring) nightvision_grabber.py:41:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:41:4: C0103: Constant name "nv_frame" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:58:0: C0103: Function name "initMemSync" doesn't conform to snake_case naming style (invalid-name) nightvision_grabber.py:58:0: C0111: Missing function docstring (missing-docstring) nightvision_grabber.py:59:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:59:4: C0103: Constant name "mc" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:70:0: C0103: Function name "sigHandler" doesn't conform to snake_case naming style (invalid-name) nightvision_grabber.py:70:0: C0111: Missing function docstring (missing-docstring) nightvision_grabber.py:71:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:71:4: C0103: Constant name "thread_running" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:72:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:72:4: C0103: Constant name "main_running" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:78:0: C0111: Missing function docstring (missing-docstring) nightvision_grabber.py:79:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:79:4: C0103: Constant name "nv_frame" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:80:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:80:4: C0103: Constant name "thread_lock" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:81:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:81:4: C0103: Constant name "thread_running" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:82:4: W0603: Using the global statement (global-statement) nightvision_grabber.py:82:4: C0103: Constant name "mc" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:93:8: C0103: Variable name "th" doesn't conform to snake_case naming style (invalid-name) nightvision_grabber.py:96:8: C0103: Variable name "th" doesn't conform to snake_case naming style (invalid-name) nightvision_grabber.py:78:0: R0912: Too many branches (14/12) (too-many-branches) nightvision_grabber.py:143:4: C0103: Constant name "parser" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_grabber.py:10:0: C0411: standard import "import sys" should be placed before "import numpy as np" (wrong-import-order)

************* Module nightvision_saver

nightvision_saver.py:4:9: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:6:13: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:7:29: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:10:9: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:11:18: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:29:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:33:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:41:24: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:57:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:75:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:79:0: C0301: Line too long (133/100) (line-too-long) nightvision_saver.py:83:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:87:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:96:0: C0301: Line too long (106/100) (line-too-long) nightvision_saver.py:99:0: C0301: Line too long (173/100) (line-too-long) nightvision_saver.py:100:89: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:101:0: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:106:41: C0303: Trailing whitespace (trailing-whitespace) nightvision_saver.py:1:0: C0111: Missing module docstring (missing-docstring) nightvision_saver.py:10:0: W0404: Reimport 'os' (imported line 4) (reimported) nightvision_saver.py:15:0: C0103: Constant name "exclude_path" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_saver.py:19:0: E0401: Unable to import 'cv2' (import-error) nightvision_saver.py:19:0: C0413: Import "import cv2" should be placed at the top of the module (wrong-import-position) nightvision_saver.py:21:0: E0401: Unable to import 'memsync' (import-error) nightvision_saver.py:21:0: C0413: Import "from memsync import MemSync" should be placed at the top of the module (wrong-import-position) nightvision_saver.py:24:0: C0103: Constant name "mc" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_saver.py:25:0: C0103: Constant name "main_running" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_saver.py:27:0: C0103: Function name "MemSyncInit" doesn't conform to snake_case naming style (invalid-name) nightvision_saver.py:27:0: C0111: Missing function docstring (missing-docstring) nightvision_saver.py:28:4: W0603: Using the global statement (global-statement) nightvision_saver.py:28:4: C0103: Constant name "mc" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_saver.py:39:0: C0103: Function name "sigHandler" doesn't conform to snake_case naming style (invalid-name) nightvision_saver.py:39:0: C0111: Missing function docstring (missing-docstring) nightvision_saver.py:40:4: W0603: Using the global statement (global-statement) nightvision_saver.py:40:4: C0103: Constant name "main_running" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_saver.py:44:0: C0111: Missing function docstring (missing-docstring) nightvision_saver.py:45:4: W0603: Using the global statement (global-statement) nightvision_saver.py:45:4: C0103: Constant name "mc" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_saver.py:94:22: W0612: Unused variable 'timestamp' (unused-variable) nightvision_saver.py:44:0: R0912: Too many branches (17/12) (too-many-branches) nightvision_saver.py:44:0: R0915: Too many statements (52/50) (too-many-statements) nightvision_saver.py:119:4: C0103: Constant name "parser" doesn't conform to UPPER_CASE naming style (invalid-name) nightvision_saver.py:8:0: W0611: Unused tz imported from dateutil (unused-import) nightvision_saver.py:9:0: C0411: standard import "import time" should be placed before "from dateutil import tz" (wrong-import-order) nightvision_saver.py:10:0: C0411: standard import "import os" should be placed before "from dateutil import tz" (wrong-import-order) nightvision_saver.py:13:0: C0411: standard import "import sys" should be placed before "from dateutil import tz" (wrong-import-order) nightvision_saver.py:10:0: C0412: Imports from package os are not grouped (ungrouped-imports) nightvision_saver.py:1:0: R0801: Similar lines in 2 files ==nightvision_grabber:7 ==nightvision_saver:10 import numpy as np

import sys

exclude_path = '/opt/ros/kinetic/lib/python2.7/dist-packages' if exclude_path in sys.path: sys.path.remove(exclude_path)

import cv2

from memsync import MemSync

FLAGS = None (duplicate-code) nightvision_saver.py:1:0: R0801: Similar lines in 2 files ==nightvision_grabber:58 ==nightvision_saver:27 global mc

memsync_id = "NightVision"
memsync_id += FLAGS.camera_num if FLAGS is not None else "1"
memsync_id += "_Image"

mc = MemSync() 
mc.SetServerInfo("localhost", "11211") 
mc.SetID(memsync_id) 
mc.GetHandle() 

def sigHandler(_signo, _stack_frame) : (duplicate-code)


Your code has been rated at 3.56/10 (previous run: 3.56/10, +0.00)