summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2012-12-13 08:47:50 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2012-12-13 08:47:50 +0100
commitcec15de1755d89963537ea0c8dacd94118ce2ff3 (patch)
tree21614677fc7aa1876120d83fa1932ce69d10e9a5
parentc33fab233dae787a29963fa71546f5ae6b8f3990 (diff)
Add Comment.get_visibility().
Omission.
-rw-r--r--kconfiglib.py9
-rw-r--r--testsuite.py1
2 files changed, 8 insertions, 2 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index f8bc69d..c790033 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -3001,8 +3001,8 @@ class Menu(Item):
#
def get_visibility(self):
- """Returns the visibility the menu gets from 'depends on' conditions.
- This is propagated to subitems."""
+ """Returns the visibility of the menu. This also affects the visibility
+ of subitems. See also Symbol.get_visibility()."""
return self.config._eval_expr(self.dep_expr)
def get_visible_if_visibility(self):
@@ -3409,6 +3409,11 @@ class Comment(Item):
# Public interface
#
+ def get_visibility(self):
+ """Returns the visibility of the comment. See also
+ Symbol.get_visibility()."""
+ return self.config._eval_expr(self.dep_expr)
+
def get_text(self):
"""Returns the text of the comment."""
return self.text
diff --git a/testsuite.py b/testsuite.py
index ff2b96a..6fd78d9 100644
--- a/testsuite.py
+++ b/testsuite.py
@@ -1101,6 +1101,7 @@ def test_call_all(conf):
m.__str__()
for c in conf.get_comments():
+ c.get_visibility()
c.get_text()
c.get_parent()
c.get_referenced_symbols()