Closed cclauss closed 6 years ago
import curses or import weakref can solve several of these...
flake8 testing of https://github.com/bad-day/TelegramTUI on Python 3.6.3
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./src/npyscreen/wgmultiselecttree.py:13:21: F821 undefined name 'curses' curses.ascii.SP: self.h_select_toggle, ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:17:34: F821 undefined name 'NPSTree' self._myFullValues = NPSTree.NPSTreeData() ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:18:35: F821 undefined name 'NPSTree' elif not isinstance(tree, NPSTree.NPSTreeData): ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:102:27: F821 undefined name 'weakref' self.value = [weakref.proxy(self.values[self.cursor_line]),] ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:111:27: F821 undefined name 'weakref' self.value = [weakref.proxy(self.values[self.cursor_line]),] ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:126:13: F821 undefined name 'curses' curses.beep() ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:142:34: F821 undefined name 'NPSTree' self._myFullValues = NPSTree.NPSTreeData() ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:143:35: F821 undefined name 'NPSTree' elif not isinstance(tree, NPSTree.NPSTreeData): ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:146:37: F821 undefined name 'NPSTree' if not isinstance(tree, NPSTree.NPSTreeData): ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:162:37: F821 undefined name 'weakref' if self._cached_tree is weakref.proxy(self._myFullValues) and \ ^ ./src/npyscreen/compatibility_code/oldtreeclasses.py:167:29: F821 undefined name 'weakref' self._cached_tree = weakref.proxy(self._myFullValues) ^ 11 F821 undefined name 'NPSTree'
Thanks! Npyscreen library really contains many bugs.
So, I fixed
Proof of fix: https://travis-ci.org/bad-day/TelegramTUI. Nice work!
import curses or import weakref can solve several of these...
flake8 testing of https://github.com/bad-day/TelegramTUI on Python 3.6.3
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics