Utilities/py3flakes/messages.py

Wed, 01 Jan 2014 14:39:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 01 Jan 2014 14:39:32 +0100
branch
Py2 comp.
changeset 3161
06f57a834adf
parent 3065
070b35dde35e
child 3178
f25fc1364c88
permissions
-rw-r--r--

Updated copyright for 2014.

88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
3161
06f57a834adf Updated copyright for 2014.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3065
diff changeset
3 # Copyright (c) 2010 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5 # Original (c) 2005 Divmod, Inc. See LICENSE file for details
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 #
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 # This module is based on pyflakes for Python2 but was heavily hacked to
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 # work with Python3 and Qt (translatable messages)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
10 """
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
11 Module implementing the messages for py3flakes.
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
12 """
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
13
3065
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3058
diff changeset
14
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
15 def QT_TRANSLATE_NOOP(mod, txt):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
16 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
17 Function to tell 'lupdate' which strings to keep for translation.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
18
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
19 @param mod module name
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
20 @param txt translatable string
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
21 @return the untranslated! string
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
22 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
23 return txt
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
25
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 class Message(object):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 Class defining the base for all specific message classes.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 message = ''
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 message_args = ()
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 def __init__(self, filename, lineno):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.filename = filename
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.lineno = lineno
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 def __str__(self):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 Special method return a string representation of the instance object.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 @return string representation of the object (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 return '{0}:{1} {2}'.format(
2997
7f0ef975da9e Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
50 self.filename, self.lineno,
7f0ef975da9e Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
51 self.message.format(*self.message_args))
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 def getMessageData(self):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 Public method to get the individual message data elements.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
57 @return tuple containing file name, line number and message
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 (string, integer, string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 """
2997
7f0ef975da9e Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
60 return (self.filename, self.lineno,
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
61 self.message, self.message_args)
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
63
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 class UnusedImport(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 Class defining the "Unused Import" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
68 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
69 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 '{0!r} imported but unused.')
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 def __init__(self, filename, lineno, name):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 @param name name of the unused import (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 self.message_args = (name,)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
83
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 class RedefinedWhileUnused(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 Class defining the "Redefined While Unused" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
88 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
89 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 'Redefinition of unused {0!r} from line {1!r}.')
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
91
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 def __init__(self, filename, lineno, name, orig_lineno):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 @param name name of the redefined object (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 @param orig_lineno line number of the original definition (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.message_args = (name, orig_lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
104
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 class ImportShadowedByLoopVar(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 Class defining the "Import Shadowed By Loop Var" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
109 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
110 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 'Import {0!r} from line {1!r} shadowed by loop variable.')
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 def __init__(self, filename, lineno, name, orig_lineno):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 @param name name of the shadowed import (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 @param orig_lineno line number of the import (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 self.message_args = (name, orig_lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
125
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 class ImportStarUsed(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 Class defining the "Import Star Used" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
130 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
131 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 "'from {0} import *' used; unable to detect undefined names.")
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 def __init__(self, filename, lineno, modname):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 @param modname name of the module imported using star import (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
143 self.message_args = (modname,)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
145
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 class UndefinedName(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 Class defining the "Undefined Name" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 """
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
150 message = QT_TRANSLATE_NOOP('py3Flakes', 'Undefined name {0!r}.')
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 def __init__(self, filename, lineno, name):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 @param name undefined name (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161 self.message_args = (name,)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
163
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 class UndefinedExport(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 Class defining the "Undefined Export" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 """
3065
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3058
diff changeset
168 message = QT_TRANSLATE_NOOP(
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3058
diff changeset
169 'py3Flakes',
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
170 'Undefined name {0!r} in __all__.')
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 def __init__(self, filename, lineno, name):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 @param name undefined exported name (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
181 self.message_args = (name,)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
183
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 class UndefinedLocal(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 Class defining the "Undefined Local Variable" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
188 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
189 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 "Local variable {0!r} (defined in enclosing scope on line {1!r})"
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 " referenced before assignment.")
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 def __init__(self, filename, lineno, name, orig_lineno):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 @param name name of the prematurely referenced variable (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 @param orig_lineno line number of the variable definition (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 self.message_args = (name, orig_lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
205
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 class DuplicateArgument(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 Class defining the "Duplicate Argument" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
210 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
211 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 'Duplicate argument {0!r} in function definition.')
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 def __init__(self, filename, lineno, name):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 @param name name of the duplicate argument (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223 self.message_args = (name,)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
225
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226 class RedefinedFunction(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 Class defining the "Redefined Function" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
230 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
231 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 'Redefinition of function {0!r} from line {1!r}.')
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 def __init__(self, filename, lineno, name, orig_lineno):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 @param name name of the redefined function (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 @param orig_lineno line number of the original definition (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 self.message_args = (name, orig_lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
246
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 class LateFutureImport(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
249 Class defining the "Late Future Import" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
250 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
251 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
252 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
253 'Future import(s) {0!r} after other statements.')
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
255 def __init__(self, filename, lineno, names):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
257 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
258
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261 @param names names of the imported futures (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 self.message_args = (names,)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
266
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
267 class UnusedVariable(Message):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
268 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
269 Class defining the "Unused Variable" message.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
271 Indicates that a variable has been explicitly assigned to but not actually
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
272 used.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
273 """
3058
0a02c433f52d Merge with default branch after fixed indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3057 3030
diff changeset
274 message = QT_TRANSLATE_NOOP(
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2997
diff changeset
275 'py3Flakes',
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
276 'Local variable {0!r} is assigned to but never used.')
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
277
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
278 def __init__(self, filename, lineno, name):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
279 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
280 Constructor
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
281
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
282 @param filename name of the file (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
283 @param lineno line number (integer)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
284 @param name name of the unused variable (string)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
285 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
286 Message.__init__(self, filename, lineno)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
287 self.message_args = (name,)

eric ide

mercurial