Fixes misleading wording in warnings E1001 and E1002 (patch by google)

authorSylvain Th?nault <sylvain.thenault@logilab.fr>
changesetda7ed73e8cff
branchdefault
phasepublic
hiddenno
parent revision#a51589d31587 closes #74087: handle case where inference of a module return YES
child revision#8353eea079aa closes #74745: make 'too general' exception names configurable (patch by Google)
files modified by this revision
checkers/newstyle.py
test/messages/func_newstyle___slots__.txt
test/messages/func_newstyle_super.txt
# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1315383916 -7200
# Wed Sep 07 10:25:16 2011 +0200
# Node ID da7ed73e8cffc796b763db709522df67160c02c4
# Parent a51589d31587490c178eba39b7b4c8d03ed18057
Fixes misleading wording in warnings E1001 and E1002 (patch by google)

diff --git a/checkers/newstyle.py b/checkers/newstyle.py
@@ -21,14 +21,14 @@
1  from pylint.interfaces import IASTNGChecker
2  from pylint.checkers import BaseChecker
3  from pylint.checkers.utils import check_messages
4 
5  MSGS = {
6 -    'E1001': ('Use __slots__ on an old style class',
7 -              'Used when an old style class use the __slots__ attribute.'),
8 -    'E1002': ('Use super on an old style class',
9 -              'Used when an old style class use the super builtin.'),
10 +    'E1001': ('Use of __slots__ on an old style class',
11 +              'Used when an old style class uses the __slots__ attribute.'),
12 +    'E1002': ('Use of super on an old style class',
13 +              'Used when an old style class uses the super builtin.'),
14      'E1003': ('Bad first argument %r given to super class',
15                'Used when another argument than the current class is given as \
16                first argument of the super builtin.'),
17      'W1001': ('Use of "property" on an old style class',
18                'Used when PyLint detect the use of the builtin "property" \
diff --git a/test/messages/func_newstyle___slots__.txt b/test/messages/func_newstyle___slots__.txt
@@ -1,1 +1,1 @@
19 -E: 10:HaNonNonNon: Use __slots__ on an old style class
20 +E: 10:HaNonNonNon: Use of __slots__ on an old style class
diff --git a/test/messages/func_newstyle_super.txt b/test/messages/func_newstyle_super.txt
@@ -1,4 +1,4 @@
21 -E:  7:Aaaa.hop: Use super on an old style class
22 -E: 11:Aaaa.__init__: Use super on an old style class
23 +E:  7:Aaaa.hop: Use of super on an old style class
24 +E: 11:Aaaa.__init__: Use of super on an old style class
25  E: 20:NewAaaa.__init__: Bad first argument 'object' given to super class
26