Closed s-celles closed 7 years ago
Hello,
Code should respect PEP8. Code linter such as flake8 can help
similar issue with gtabview https://github.com/TabViewer/gtabview/issues/25
$ flake8 --ignore E501 . ./setup.py:6:5: F401 'setuptools' imported but unused ./tabview/__init__.py:1:1: F401 '.tabview.view' imported but unused ./tabview/tabview.py:30:11: F821 undefined name 'unicode' ./tabview/tabview.py:646:26: E241 multiple spaces after ':' ./tabview/tabview.py:647:26: E241 multiple spaces after ':' ./tabview/tabview.py:648:26: E241 multiple spaces after ':' ./tabview/tabview.py:649:26: E241 multiple spaces after ':' ./tabview/tabview.py:650:26: E241 multiple spaces after ':' ./tabview/tabview.py:651:26: E241 multiple spaces after ':' ./tabview/tabview.py:652:26: E241 multiple spaces after ':' ./tabview/tabview.py:653:26: E241 multiple spaces after ':' ./tabview/tabview.py:654:26: E241 multiple spaces after ':' ./tabview/tabview.py:655:26: E241 multiple spaces after ':' ./tabview/tabview.py:656:26: E241 multiple spaces after ':' ./tabview/tabview.py:657:26: E241 multiple spaces after ':' ./tabview/tabview.py:658:26: E241 multiple spaces after ':' ./tabview/tabview.py:659:26: E241 multiple spaces after ':' ./tabview/tabview.py:660:26: E241 multiple spaces after ':' ./tabview/tabview.py:661:26: E241 multiple spaces after ':' ./tabview/tabview.py:662:26: E241 multiple spaces after ':' ./tabview/tabview.py:663:26: E241 multiple spaces after ':' ./tabview/tabview.py:664:27: E241 multiple spaces after ':' ./tabview/tabview.py:665:26: E241 multiple spaces after ':' ./tabview/tabview.py:666:26: E241 multiple spaces after ':' ./tabview/tabview.py:667:26: E241 multiple spaces after ':' ./tabview/tabview.py:668:26: E241 multiple spaces after ':' ./tabview/tabview.py:669:26: E241 multiple spaces after ':' ./tabview/tabview.py:670:26: E241 multiple spaces after ':' ./tabview/tabview.py:671:26: E241 multiple spaces after ':' ./tabview/tabview.py:672:26: E241 multiple spaces after ':' ./tabview/tabview.py:673:26: E241 multiple spaces after ':' ./tabview/tabview.py:674:26: E241 multiple spaces after ':' ./tabview/tabview.py:675:26: E241 multiple spaces after ':' ./tabview/tabview.py:676:26: E241 multiple spaces after ':' ./tabview/tabview.py:677:26: E241 multiple spaces after ':' ./tabview/tabview.py:678:26: E241 multiple spaces after ':' ./tabview/tabview.py:679:26: E241 multiple spaces after ':' ./tabview/tabview.py:680:26: E241 multiple spaces after ':' ./tabview/tabview.py:681:26: E241 multiple spaces after ':' ./tabview/tabview.py:682:26: E241 multiple spaces after ':' ./tabview/tabview.py:683:26: E241 multiple spaces after ':' ./tabview/tabview.py:684:26: E241 multiple spaces after ':' ./tabview/tabview.py:685:26: E241 multiple spaces after ':' ./tabview/tabview.py:686:26: E241 multiple spaces after ':' ./tabview/tabview.py:687:26: E241 multiple spaces after ':' ./tabview/tabview.py:688:36: E241 multiple spaces after ':' ./tabview/tabview.py:689:36: E241 multiple spaces after ':' ./tabview/tabview.py:690:38: E241 multiple spaces after ':' ./tabview/tabview.py:691:38: E241 multiple spaces after ':' ./tabview/tabview.py:692:39: E241 multiple spaces after ':' ./tabview/tabview.py:693:38: E241 multiple spaces after ':' ./tabview/tabview.py:694:37: E241 multiple spaces after ':' ./tabview/tabview.py:695:39: E241 multiple spaces after ':' ./tabview/tabview.py:696:39: E241 multiple spaces after ':' ./tabview/tabview.py:697:36: E241 multiple spaces after ':' ./tabview/tabview.py:698:36: E241 multiple spaces after ':' ./tabview/tabview.py:699:39: E241 multiple spaces after ':' ./tabview/tabview.py:700:36: E241 multiple spaces after ':' ./tabview/tabview.py:701:36: E241 multiple spaces after ':' ./tabview/tabview.py:702:36: E241 multiple spaces after ':' ./tabview/tabview.py:703:36: E241 multiple spaces after ':' ./tabview/tabview.py:1039:31: E241 multiple spaces after ':' ./tabview/tabview.py:1040:43: E241 multiple spaces after ':' ./tabview/tabview.py:1041:30: E241 multiple spaces after ':' ./tabview/tabview.py:1043:42: E241 multiple spaces after ':' ./tabview/tabview.py:1044:30: E241 multiple spaces after ':' ./tabview/tabview.py:1045:40: E241 multiple spaces after ':' ./tabview/tabview.py:1046:30: E241 multiple spaces after ':' ./tabview/tabview.py:1063:14: W503 line break before binary operator ./test/test_tabview.py:142:1: E305 expected 2 blank lines after class or function definition, found 1
It can be add on Travis side, so when PR is send PEP8 conformance is checked
Kind regards
Landscape also provides code quality metrics https://landscape.io
Merged your PEP8 PR, thanks!
Hello,
Code should respect PEP8. Code linter such as flake8 can help
similar issue with gtabview https://github.com/TabViewer/gtabview/issues/25
It can be add on Travis side, so when PR is send PEP8 conformance is checked
Kind regards