[pyzo] 14/19: Workspace can hide private variables. Closes #385

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri Jul 1 16:22:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository pyzo.

commit 71e5a3da9fc4ec9cb98d9a4cbabd65f51f918795
Author: Almar Klein <almar.klein at gmail.com>
Date:   Mon Jun 27 16:26:06 2016 +0200

    Workspace can hide private variables. Closes #385
---
 pyzo/tools/pyzoWorkspace.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pyzo/tools/pyzoWorkspace.py b/pyzo/tools/pyzoWorkspace.py
index f0afe55..c5d18c1 100644
--- a/pyzo/tools/pyzoWorkspace.py
+++ b/pyzo/tools/pyzoWorkspace.py
@@ -256,11 +256,15 @@ class WorkspaceTree(QtGui.QTreeWidget):
             if len(parts) < 4:
                 continue
             
+            name = parts[0]
+            
             # Pop the 'kind' element
             kind = parts.pop(2)
             
             if kind in self._config.hideTypes:
                 continue
+            if name.startswith('_') and 'private' in self._config.hideTypes:
+                continue
             
             # Create item
             item = QtGui.QTreeWidgetItem(parts, 0)
@@ -344,7 +348,7 @@ class PyzoWorkspace(QtGui.QWidget):
         menu = self._options._menu
         menu.clear()
         
-        for type in ['type', 'function', 'module']:
+        for type in ['type', 'function', 'module', 'private']:
             checked = type in self._config.hideTypes
             action = menu.addAction('Hide %s'%type)
             action.setCheckable(True)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyzo.git



More information about the debian-science-commits mailing list