kaustubh-sadekar / OmniCV-Lib

A computer vision library for omnidirectional (360 degree) cameras.
MIT License
144 stars 21 forks source link

Linting errors #11

Closed engnadeau closed 2 years ago

engnadeau commented 4 years ago

Linting errors should be fixed and CI should be created to prevent these errors in the future.

Flake8

Running flake8 on the codebase gives many linting errors:

./Examples/fisheye2equirect.py:3:1: F401 'numpy as np' imported but unused
./Examples/fisheye2equirect.py:4:1: F401 'math' imported but unused
./Examples/fisheye2equirect.py:6:1: F401 'time' imported but unused
./Examples/fisheye2equirect.py:22:1: E266 too many leading '#' for block comment
./Examples/fisheye2equirect.py:22:80: E501 line too long (106 > 79 characters)
./Examples/fisheye2equirect.py:31:80: E501 line too long (100 > 79 characters)
./Examples/fisheye2equirect.py:33:1: W191 indentation contains tabs
./Examples/fisheye2equirect.py:46:80: E501 line too long (80 > 79 characters)
./Examples/cubemap2persp.py:3:1: F401 'numpy as np' imported but unused
./Examples/cubemap2persp.py:4:1: F401 'math' imported but unused
./Examples/cubemap2persp.py:5:1: F401 'time' imported but unused
./Examples/cubemap2persp.py:19:1: E266 too many leading '#' for block comment
./Examples/cubemap2persp.py:19:80: E501 line too long (95 > 79 characters)
./Examples/cubemap2persp.py:22:80: E501 line too long (86 > 79 characters)
./Examples/equirect2persp.py:3:1: F401 'numpy as np' imported but unused
./Examples/equirect2persp.py:4:1: F401 'math' imported but unused
./Examples/equirect2persp.py:17:1: E266 too many leading '#' for block comment
./Examples/equirect2persp.py:17:80: E501 line too long (95 > 79 characters)
./Examples/equirect2persp.py:39:80: E501 line too long (133 > 79 characters)
./Examples/equirect2cubemap.py:3:1: F401 'numpy as np' imported but unused
./Examples/equirect2cubemap.py:4:1: F401 'math' imported but unused
./Examples/equirect2cubemap.py:19:1: E266 too many leading '#' for block comment
./Examples/equirect2cubemap.py:19:80: E501 line too long (95 > 79 characters)
./Examples/equirect2fisheye.py:3:1: F401 'numpy as np' imported but unused
./Examples/equirect2fisheye.py:4:1: F401 'math' imported but unused
./Examples/equirect2fisheye.py:5:1: F401 'time' imported but unused
./Examples/equirect2fisheye.py:19:1: E266 too many leading '#' for block comment
./Examples/equirect2fisheye.py:19:80: E501 line too long (95 > 79 characters)
./Examples/equirect2fisheye.py:30:80: E501 line too long (100 > 79 characters)
./Examples/equirect2fisheye.py:37:80: E501 line too long (93 > 79 characters)
./Examples/equirect2fisheye.py:74:80: E501 line too long (80 > 79 characters)
./Examples/cubemap2equirect.py:3:1: F401 'numpy as np' imported but unused
./Examples/cubemap2equirect.py:4:1: F401 'math' imported but unused
./Examples/cubemap2equirect.py:19:1: E266 too many leading '#' for block comment
./Examples/cubemap2equirect.py:19:80: E501 line too long (95 > 79 characters)
./Examples/cubemap2equirect.py:23:80: E501 line too long (138 > 79 characters)
./omnicv/__init__.py:1:1: F403 'from omnicv.omnicv import *' used; unable to detect undefined names
./omnicv/__init__.py:1:1: F401 'omnicv.omnicv.*' imported but unused
./omnicv/omnicv.py:4:1: F401 'math' imported but unused
./omnicv/omnicv.py:5:1: F401 'time' imported but unused
./omnicv/omnicv.py:45:80: E501 line too long (87 > 79 characters)
./omnicv/omnicv.py:80:80: E501 line too long (82 > 79 characters)
./omnicv/omnicv.py:96:80: E501 line too long (97 > 79 characters)
./omnicv/omnicv.py:107:80: E501 line too long (81 > 79 characters)
./omnicv/omnicv.py:108:80: E501 line too long (81 > 79 characters)
./omnicv/omnicv.py:132:80: E501 line too long (84 > 79 characters)
./omnicv/omnicv.py:137:33: E203 whitespace before ':'
./omnicv/omnicv.py:138:33: E203 whitespace before ':'
./omnicv/omnicv.py:141:33: E203 whitespace before ':'
./omnicv/omnicv.py:142:33: E203 whitespace before ':'
./omnicv/omnicv.py:145:33: E203 whitespace before ':'
./omnicv/omnicv.py:146:33: E203 whitespace before ':'
./omnicv/omnicv.py:149:33: E203 whitespace before ':'
./omnicv/omnicv.py:150:33: E203 whitespace before ':'
./omnicv/omnicv.py:153:33: E203 whitespace before ':'
./omnicv/omnicv.py:154:33: E203 whitespace before ':'
./omnicv/omnicv.py:157:33: E203 whitespace before ':'
./omnicv/omnicv.py:158:33: E203 whitespace before ':'
./omnicv/omnicv.py:162:33: E203 whitespace before ':'
./omnicv/omnicv.py:163:33: E203 whitespace before ':'
./omnicv/omnicv.py:166:33: E203 whitespace before ':'
./omnicv/omnicv.py:167:33: E203 whitespace before ':'
./omnicv/omnicv.py:170:33: E203 whitespace before ':'
./omnicv/omnicv.py:171:33: E203 whitespace before ':'
./omnicv/omnicv.py:174:33: E203 whitespace before ':'
./omnicv/omnicv.py:175:33: E203 whitespace before ':'
./omnicv/omnicv.py:178:33: E203 whitespace before ':'
./omnicv/omnicv.py:179:33: E203 whitespace before ':'
./omnicv/omnicv.py:182:33: E203 whitespace before ':'
./omnicv/omnicv.py:183:33: E203 whitespace before ':'
./omnicv/omnicv.py:185:80: E501 line too long (101 > 79 characters)
./omnicv/omnicv.py:188:80: E501 line too long (86 > 79 characters)
./omnicv/omnicv.py:191:80: E501 line too long (82 > 79 characters)
./omnicv/omnicv.py:194:80: E501 line too long (103 > 79 characters)
./omnicv/omnicv.py:214:41: E203 whitespace before ':'
./omnicv/omnicv.py:215:50: E203 whitespace before ':'
./omnicv/omnicv.py:216:41: E203 whitespace before ':'
./omnicv/omnicv.py:217:41: E203 whitespace before ':'
./omnicv/omnicv.py:222:41: E203 whitespace before ':'
./omnicv/omnicv.py:223:41: E203 whitespace before ':'
./omnicv/omnicv.py:224:50: E203 whitespace before ':'
./omnicv/omnicv.py:225:50: E203 whitespace before ':'
./omnicv/omnicv.py:230:41: E203 whitespace before ':'
./omnicv/omnicv.py:231:41: E203 whitespace before ':'
./omnicv/omnicv.py:232:41: E203 whitespace before ':'
./omnicv/omnicv.py:233:41: E203 whitespace before ':'
./omnicv/omnicv.py:271:21: E203 whitespace before ':'
./omnicv/omnicv.py:272:25: E203 whitespace before ':'
./omnicv/omnicv.py:273:25: E203 whitespace before ':'
./omnicv/omnicv.py:274:25: E203 whitespace before ':'
./omnicv/omnicv.py:365:9: F841 local variable 'wangle' is assigned to but never used
./omnicv/omnicv.py:366:80: E501 line too long (85 > 79 characters)
./omnicv/omnicv.py:370:9: F841 local variable 'hangle' is assigned to but never used
./omnicv/omnicv.py:371:80: E501 line too long (85 > 79 characters)
./omnicv/omnicv.py:411:80: E501 line too long (108 > 79 characters)
./omnicv/omnicv.py:414:80: E501 line too long (82 > 79 characters)
./omnicv/omnicv.py:451:9: F841 local variable 'wangle' is assigned to but never used
./omnicv/omnicv.py:452:80: E501 line too long (87 > 79 characters)
./omnicv/omnicv.py:455:9: F841 local variable 'hangle' is assigned to but never used
./omnicv/omnicv.py:456:80: E501 line too long (87 > 79 characters)
./omnicv/omnicv.py:494:80: E501 line too long (108 > 79 characters)
./omnicv/omnicv.py:497:80: E501 line too long (82 > 79 characters)
./omnicv/omnicv.py:532:80: E501 line too long (85 > 79 characters)
./omnicv/omnicv.py:599:80: E501 line too long (82 > 79 characters)
./omnicv/omnicv.py:619:80: E501 line too long (85 > 79 characters)
./omnicv/omnicv.py:716:80: E501 line too long (93 > 79 characters)
./omnicv/omnicv.py:740:80: E501 line too long (84 > 79 characters)
./omnicv/omnicv.py:797:80: E501 line too long (82 > 79 characters)
./omnicv/omnicv.py:812:9: F841 local variable 'xref' is assigned to but never used
./omnicv/omnicv.py:813:9: F841 local variable 'yref' is assigned to but never used
./omnicv/omnicv.py:815:80: E501 line too long (93 > 79 characters)
./omnicv/omnicv.py:865:80: E501 line too long (86 > 79 characters)
./omnicv/omnicv.py:891:80: E501 line too long (93 > 79 characters)
./omnicv/omnicv.py:893:80: E501 line too long (87 > 79 characters)
./omnicv/omnicv.py:903:80: E501 line too long (88 > 79 characters)
./omnicv/omnicv.py:907:80: E501 line too long (86 > 79 characters)
./omnicv/omnicv.py:982:50: E203 whitespace before ':'
./omnicv/omnicv.py:983:59: E203 whitespace before ':'
./omnicv/omnicv.py:983:80: E501 line too long (83 > 79 characters)
./omnicv/omnicv.py:984:50: E203 whitespace before ':'
./omnicv/omnicv.py:985:50: E203 whitespace before ':'
./omnicv/omnicv.py:990:50: E203 whitespace before ':'
./omnicv/omnicv.py:991:50: E203 whitespace before ':'
./omnicv/omnicv.py:992:59: E203 whitespace before ':'
./omnicv/omnicv.py:992:80: E501 line too long (83 > 79 characters)
./omnicv/omnicv.py:993:59: E203 whitespace before ':'
./omnicv/omnicv.py:993:80: E501 line too long (83 > 79 characters)
./omnicv/omnicv.py:998:50: E203 whitespace before ':'
./omnicv/omnicv.py:999:50: E203 whitespace before ':'
./omnicv/omnicv.py:1000:50: E203 whitespace before ':'
./omnicv/omnicv.py:1001:50: E203 whitespace before ':'
./omnicv/omnicv.py:1015:80: E501 line too long (83 > 79 characters)
./omnicv/omnicv.py:1055:80: E501 line too long (83 > 79 characters)
./applications/UCM_GUI.py:3:1: F401 'numpy as np' imported but unused
./applications/UCM_GUI.py:4:1: F401 'math' imported but unused
./applications/UCM_GUI.py:5:1: F401 'time' imported but unused
./applications/set_fisheye_params_gui.py:3:1: F401 'numpy as np' imported but unused
./applications/set_fisheye_params_gui.py:4:1: F401 'math' imported but unused
./applications/set_fisheye_params_gui.py:55:80: E501 line too long (87 > 79 characters)
./applications/ViewerGUI.py:3:1: F401 'numpy as np' imported but unused
./applications/ViewerGUI.py:4:1: F401 'math' imported but unused
./applications/ViewerGUI.py:5:1: F401 'time' imported but unused
./tests/tests_visual.py:5:1: F401 'math' imported but unused
./tests/tests_visual.py:6:1: F401 'time' imported but unused
./tests/tests_visual.py:7:1: F401 'sys' imported but unused
./tests/tests_visual.py:22:80: E501 line too long (88 > 79 characters)
./tests/tests_visual.py:32:80: E501 line too long (82 > 79 characters)
./tests/tests_visual.py:47:80: E501 line too long (82 > 79 characters)
./tests/tests_visual.py:62:80: E501 line too long (82 > 79 characters)
./tests/tests_visual.py:77:80: E501 line too long (82 > 79 characters)
./tests/tests_visual.py:101:80: E501 line too long (83 > 79 characters)
./tests/tests_visual.py:117:80: E501 line too long (83 > 79 characters)
./tests/tests_visual.py:135:80: E501 line too long (82 > 79 characters)
./tests/tests_visual.py:148:80: E501 line too long (82 > 79 characters)
./tests/tests_visual.py:160:80: E501 line too long (88 > 79 characters)
./tests/tests_visual.py:179:80: E501 line too long (83 > 79 characters)
./tests/tests_visual.py:198:80: E501 line too long (83 > 79 characters)
./tests/tests_visual.py:215:80: E501 line too long (88 > 79 characters)
./tests/tests_visual.py:231:80: E501 line too long (88 > 79 characters)
./tests/tests.py:4:1: F401 'numpy as np' imported but unused
./tests/tests.py:5:1: F401 'math' imported but unused
./tests/tests.py:6:1: F401 'time' imported but unused
./tests/tests.py:7:1: F401 'sys' imported but unused
./tests/tests.py:20:80: E501 line too long (88 > 79 characters)

Vulture

vulture gives the following errors:

applications/set_fisheye_params_gui.py:4: unused import 'math' (90% confidence)
applications/set_fisheye_params_gui.py:29: redundant if-condition (100% confidence)
applications/set_fisheye_params_gui.py:63: redundant if-condition (100% confidence)
applications/UCM_GUI.py:4: unused import 'math' (90% confidence)
applications/ViewerGUI.py:4: unused import 'math' (90% confidence)
Examples/cubemap2equirect.py:4: unused import 'math' (90% confidence)
Examples/cubemap2persp.py:4: unused import 'math' (90% confidence)
Examples/equirect2cubemap.py:4: unused import 'math' (90% confidence)
Examples/equirect2fisheye.py:4: unused import 'math' (90% confidence)
Examples/equirect2persp.py:4: unused import 'math' (90% confidence)
Examples/fisheye2equirect.py:4: unused import 'math' (90% confidence)
omnicv/omnicv.py:4: unused import 'math' (90% confidence)
omnicv/omnicv.py:41: unused attribute 'singleLens' (60% confidence)
omnicv/omnicv.py:365: unused variable 'wangle' (60% confidence)
omnicv/omnicv.py:370: unused variable 'hangle' (60% confidence)
omnicv/omnicv.py:451: unused variable 'wangle' (60% confidence)
omnicv/omnicv.py:455: unused variable 'hangle' (60% confidence)
omnicv/omnicv.py:961: unused method 'applyMap' (60% confidence)
tests/tests.py:5: unused import 'math' (90% confidence)
tests/tests_visual.py:5: unused import 'math' (90% confidence)

cc https://github.com/openjournals/joss-reviews/issues/2533