[master 2/3] Display the name of the overridden ancestor in error message.

mulkieran installerbot-noreply at redhat.com
Mon Mar 16 13:29:44 UTC 2015


From: mulhern <amulhern at redhat.com>

Signed-off-by: mulhern <amulhern at redhat.com>
---
 tests/pylint/pointless-override.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/pylint/pointless-override.py b/tests/pylint/pointless-override.py
index cf2608f..6f7160c 100644
--- a/tests/pylint/pointless-override.py
+++ b/tests/pylint/pointless-override.py
@@ -244,13 +244,13 @@ class D(B,C):
     msgs = {
        "W9951":
        (
-          "Assignment to class attribute %s overrides identical assignment in ancestor.",
+          "Assignment to class attribute %s overrides identical assignment in ancestor %s.",
           "pointless-class-attribute-override",
           "Assignment to class attribute  that overrides assignment in ancestor that assigns identical value has no effect."
        ),
        "W9952":
        (
-          "definition of %s method overrides identical method definition in ancestor",
+          "Definition of %s method overrides identical method definition in ancestor %s.",
           "pointless-method-definition-override",
           "Overriding empty method definition with another empty method definition has no effect."
        )
@@ -264,7 +264,7 @@ def visit_class(self, node):
                     match = next((v for (n, v) in checker.get_data(a, False) if n == name), None)
                     if match is not None:
                         if checker.check_equal(value, match):
-                            self.add_message(checker.message_id, node=value, args=(name,))
+                            self.add_message(checker.message_id, node=value, args=(name,a.name))
                         break
 
 def register(linter):


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/7f42f97d3e1ba42b5335cebce938a2390f6994c6


More information about the anaconda-patches mailing list