diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-20 05:03:11 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-20 05:21:17 +0200 |
| commit | 478a0644ef3d8332a7c21ef4e4de0ef10541af2c (patch) | |
| tree | 2a54ba347c370912300ca0a95a6c62830754d100 | |
| parent | 75b4b8b2b1afec420cd06b898b8097de77b4772b (diff) | |
Clean up Comment method ordering.
Make somewhat consistent with the other classes.
| -rw-r--r-- | kconfiglib.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 7e90ee0..121a8cc 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2955,11 +2955,6 @@ class Comment(Item): """Returns the Config instance this comment is from.""" return self.config - 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 @@ -2971,16 +2966,21 @@ class Comment(Item): representation.""" return self.parent - def get_referenced_symbols(self, refs_from_enclosing=False): - """See Symbol.get_referenced_symbols().""" - return self.all_referenced_syms if refs_from_enclosing else \ - self.referenced_syms - def get_location(self): """Returns the location of the comment as a (filename, linenr) tuple, where filename is a string and linenr an int.""" return (self.filename, self.linenr) + 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_referenced_symbols(self, refs_from_enclosing=False): + """See Symbol.get_referenced_symbols().""" + return self.all_referenced_syms if refs_from_enclosing else \ + self.referenced_syms + def __str__(self): """Returns a string containing various information about the comment.""" |
