eric6/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/messages.py

Sat, 27 Feb 2021 12:08:23 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 27 Feb 2021 12:08:23 +0100
changeset 8138
169e65a6787c
parent 7963
19bbd56ac5f2
child 8043
0acf98cd089a
child 8207
d359172d11be
permissions
-rw-r--r--

Shell: added functionality to show a prompt when the main client process has exited (e.g. a script ended).

2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7639
diff changeset
3 # Copyright (c) 2010 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
4 #
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
5 # Original (c) 2005 Divmod, Inc. See __init__.py file for details
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
6 #
7635
0cdead130a81 Removed support for Python2 and removed support for Qt4 (PyQt4 and pyside).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7617
diff changeset
7 # This module is based on pyflakes, but was modified to
7960
e8fc383322f7 Harmonized some user visible strings and changed the term 'eric6' to the more generic 'eric'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
8 # be integrated into eric
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
9
3065
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2571
diff changeset
10 """
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
11 Module providing the class Message and its subclasses.
3065
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2571
diff changeset
12 """
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2571
diff changeset
13
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
14
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
15 class Message(object):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
16 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
17 Class defining the base for all specific message classes.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
18 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
19 message_id = 'F00'
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
20 message = ''
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
21 message_args = ()
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
22
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
23 def __init__(self, filename, loc):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
24 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
25 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
26
7064
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
27 @param filename name of the file
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
28 @type str
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
29 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
30 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
31 self.filename = filename
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
32 self.lineno = loc.lineno
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
33 self.col = getattr(loc, 'col_offset', 0)
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
34
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
35 def __str__(self):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
36 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
37 Special method return a string representation of the instance object.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
38
7064
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
39 @return string representation of the object
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
40 @rtype str
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
41 """
7064
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
42 return '{0}:{1}:{2} {3}'.format(
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
43 self.filename, self.lineno, self.col + 1,
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
44 self.message % self.message_args)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
45
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
46 def getMessageData(self):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
47 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
48 Public method to get the individual message data elements.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
49
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
50 @return tuple containing file name, line number, column, message ID
7064
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
51 and message arguments
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
52 @rtype tuple of (str, int, int, str, list)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
53 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
54 return (self.filename, self.lineno, self.col, self.message_id,
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
55 self.message_args)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
56
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
57
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
58 class UnusedImport(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
59 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
60 Class defining the "Unused Import" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
61 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
62 message_id = 'F01'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
63 message = '%r imported but unused'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
64
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
65 def __init__(self, filename, loc, name):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
66 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
67 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
68
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
69 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
70 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
71 @param name name of the unused import (string)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
72 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
73 Message.__init__(self, filename, loc)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
74 self.message_args = (name,)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
75
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
76
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
77 class RedefinedWhileUnused(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
78 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
79 Class defining the "Redefined While Unused" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
80 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
81 message_id = 'F02'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
82 message = 'redefinition of unused %r from line %r'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
83
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
84 def __init__(self, filename, loc, name, orig_loc):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
85 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
86 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
87
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
88 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
89 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
90 @param name name of the redefined object (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
91 @param orig_loc location of the original definition
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
92 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
93 Message.__init__(self, filename, loc)
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
94 self.message_args = (name, orig_loc.lineno)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
95
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
96
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
97 class RedefinedInListComp(Message):
3065
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2571
diff changeset
98 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
99 Class defining the "Redefined In List Comprehension" message.
3065
070b35dde35e Fixed a bunch of indentation issues.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2571
diff changeset
100 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
101 message_id = 'F12'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
102 message = 'list comprehension redefines %r from line %r'
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
103
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
104 def __init__(self, filename, loc, name, orig_loc):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
105 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
106 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
107
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
108 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
109 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
110 @param name name of the redefined object (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
111 @param orig_loc location of the original definition
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
112 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
113 Message.__init__(self, filename, loc)
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
114 self.message_args = (name, orig_loc.lineno)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
115
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
116
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
117 class ImportShadowedByLoopVar(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
118 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
119 Class defining the "Import Shadowed By Loop Var" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
120 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
121 message_id = 'F03'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
122 message = 'import %r from line %r shadowed by loop variable'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
123
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
124 def __init__(self, filename, loc, name, orig_loc):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
125 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
126 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
127
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
128 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
129 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
130 @param name name of the shadowed import (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
131 @param orig_loc location of the import
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
132 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
133 Message.__init__(self, filename, loc)
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
134 self.message_args = (name, orig_loc.lineno)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
135
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
136
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
137 class ImportStarNotPermitted(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
138 """
5106
1ecc6c9abca5 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5067
diff changeset
139 Class defining the "Import * not permitted" message.
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
140 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
141 message_id = 'F16'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
142 message = "'from %s import *' only allowed at module level"
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
143
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
144 def __init__(self, filename, loc, modname):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
145 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
146 Constructor
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
147
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
148 @param filename name of the file (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
149 @param loc location of the issue
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
150 @param modname name of the module (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
151 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
152 Message.__init__(self, filename, loc)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
153 self.message_args = (modname,)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
154
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
155
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
156 class ImportStarUsed(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
157 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
158 Class defining the "Import Star Used" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
159 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
160 message_id = 'F04'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
161 message = "'from %s import *' used; unable to detect undefined names"
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
162
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
163 def __init__(self, filename, loc, modname):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
164 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
165 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
166
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
167 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
168 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
169 @param modname name of the module imported using star import (string)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
170 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
171 Message.__init__(self, filename, loc)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
172 self.message_args = (modname,)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
173
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
174
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
175 class ImportStarUsage(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
176 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
177 Class defining the "Import Star Usage" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
178 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
179 message_id = 'F17'
5510
cdcd0cd34e79 Upgraded pyflakes to version 1.5.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 5389
diff changeset
180 message = "%r may be undefined, or defined from star imports: %s"
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
181
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
182 def __init__(self, filename, loc, name, from_list):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
183 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
184 Constructor
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
185
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
186 @param filename name of the file (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
187 @param loc location of the issue
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
188 @param name name of the variable (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
189 @param from_list list of modules imported from with * (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
190 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
191 Message.__init__(self, filename, loc)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
192 self.message_args = (name, from_list)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
193
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
194
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
195 class UndefinedName(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
196 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
197 Class defining the "Undefined Name" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
198 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
199 message_id = 'F05'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
200 message = 'undefined name %r'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
201
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
202 def __init__(self, filename, loc, name):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
203 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
204 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
205
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
206 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
207 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
208 @param name undefined name (string)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
209 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
210 Message.__init__(self, filename, loc)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
211 self.message_args = (name,)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
212
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
213
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
214 class DoctestSyntaxError(Message):
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
215 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
216 Class defining the "Doctest syntax Error" message.
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
217 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
218 message_id = 'F13'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
219 message = 'syntax error in doctest'
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
220
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
221 def __init__(self, filename, loc, position=None):
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
222 """
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
223 Constructor
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
224
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
225 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
226 @param loc location of the issue
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
227 @param position position of the syntax error
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
228 """
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
229 Message.__init__(self, filename, loc)
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
230 if position:
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
231 (self.lineno, self.col) = position
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
232 self.message_args = ()
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
233
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
234
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
235 class UndefinedExport(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
236 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
237 Class defining the "Undefined Export" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
238 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
239 message_id = 'F06'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
240 message = 'undefined name %r in __all__'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
241
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
242 def __init__(self, filename, loc, name):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
243 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
244 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
245
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
246 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
247 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
248 @param name undefined exported name (string)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
249 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
250 Message.__init__(self, filename, loc)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
251 self.message_args = (name,)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
252
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
253
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
254 class UndefinedLocal(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
255 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
256 Class defining the "Undefined Local Variable" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
257 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
258 message_id = 'F07'
6742
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
259 message = 'local variable %r {0} referenced before assignment'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
260
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
261 default = 'defined in enclosing scope on line %r'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
262 builtin = 'defined as a builtin'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
263
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
264 def __init__(self, filename, loc, name, orig_loc):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
265 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
266 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
267
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
268 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
269 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
270 @param name name of the prematurely referenced variable (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
271 @param orig_loc location of the variable definition
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
272 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
273 Message.__init__(self, filename, loc)
6742
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
274 if orig_loc is None:
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
275 self.message = self.message.format(self.builtin)
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
276 self.message_args = (name,)
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
277 self.message_id = 'F07B'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
278 else:
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
279 self.message = self.message.format(self.default)
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
280 self.message_args = (name, orig_loc.lineno)
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
281 self.message_id = 'F07A'
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
282
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
283
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
284 class DuplicateArgument(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
285 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
286 Class defining the "Duplicate Argument" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
287 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
288 message_id = 'F08'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
289 message = 'duplicate argument %r in function definition'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
290
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
291 def __init__(self, filename, loc, name):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
292 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
293 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
294
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
295 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
296 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
297 @param name name of the duplicate argument (string)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
298 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
299 Message.__init__(self, filename, loc)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
300 self.message_args = (name,)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
301
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
302
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
303 class MultiValueRepeatedKeyLiteral(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
304 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
305 Class defining the multiple used dictionary key message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
306 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
307 message_id = 'F18'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
308 message = 'dictionary key %r repeated with different values'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
309
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
310 def __init__(self, filename, loc, key):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
311 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
312 Constructor
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
313
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
314 @param filename name of the file (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
315 @param loc location of the issue
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
316 @param key dictionary key (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
317 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
318 Message.__init__(self, filename, loc)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
319 self.message_args = (key,)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
320
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
321
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
322 class MultiValueRepeatedKeyVariable(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
323 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
324 Class defining the multiple used dictionary key variable message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
325 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
326 message_id = 'F19'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
327 message = 'dictionary key variable %s repeated with different values'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
328
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
329 def __init__(self, filename, loc, key):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
330 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
331 Constructor
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
332
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
333 @param filename name of the file (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
334 @param loc location of the issue
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
335 @param key dictionary key variable (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
336 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
337 Message.__init__(self, filename, loc)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
338 self.message_args = (key,)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
339
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
340
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
341 class LateFutureImport(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
342 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
343 Class defining the "Late Future Import" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
344 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
345 message_id = 'F10'
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
346 message = 'from __future__ imports must occur at the beginning of the file'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
347
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
348 def __init__(self, filename, loc, names):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
349 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
350 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
351
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
352 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
353 @param loc location of the issue
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
354 @param names names of the imported futures (string)
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
355 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
356 Message.__init__(self, filename, loc)
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
357 self.message_args = ()
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
358
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
359
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
360 class FutureFeatureNotDefined(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
361 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
362 Class defining the undefined __future__ feature message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
363 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
364 message_id = 'F20'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
365 message = 'future feature %s is not defined'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
366
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
367 def __init__(self, filename, loc, name):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
368 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
369 Constructor
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
370
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
371 @param filename name of the file (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
372 @param loc location of the issue
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
373 @param name name of the imported undefined future feature (string)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
374 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
375 Message.__init__(self, filename, loc)
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
376 self.message_args = (name,)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
377
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
378
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
379 class UnusedVariable(Message):
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
380 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
381 Class defining the "Unused Variable" message.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
382
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
383 Indicates that a variable has been explicitly assigned to but not actually
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
384 used.
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
385 """
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
386 message_id = 'F11'
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
387 message = 'local variable %r is assigned to but never used'
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
388
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
389 def __init__(self, filename, loc, names):
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
390 """
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
391 Constructor
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
392
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
393 @param filename name of the file (string)
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
394 @param loc location of the issue
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456
diff changeset
395 @param names names of unused variable (string)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
396 """
3177
5af61402d74d Update pyflakes to 0.7.3
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3159
diff changeset
397 Message.__init__(self, filename, loc)
2571
e6bb19eb87ea Fixes for autocodecheck with pyflakes and update of py2flakes to 0.6.1.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
diff changeset
398 self.message_args = (names,)
3544
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
399
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
400
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
401 class ReturnWithArgsInsideGenerator(Message):
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
402 """
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
403 Class defining the "Return values in generator" message.
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
404
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
405 Indicates a return statement with arguments inside a generator.
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
406 """
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
407 message_id = 'F14'
431c842fd09a updated pyflakes to version 0.8.1 (Python 3.4.0 compatible)
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3484
diff changeset
408 message = '\'return\' with argument inside generator'
4502
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
409
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
410
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
411 class ReturnOutsideFunction(Message):
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
412 """
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
413 Class defining the "Return outside function" message.
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
414
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
415 Indicates a return statement outside of a function/method.
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
416 """
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
417 message_id = 'F15'
76f2b46437a6 Updated to pyflakes 1.0.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
418 message = '\'return\' outside function'
4555
861e1741985c Adjustments to future imports for Python 2 compatibility.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 4544
diff changeset
419
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
420
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
421 class YieldOutsideFunction(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
422 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
423 Class defining the "Yield outside function" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
424
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
425 Indicates a yield or yield from statement outside of a function/method.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
426 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
427 message_id = 'F21'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
428 message = '\'yield\' outside function'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
429
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
430
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
431 # For whatever reason, Python gives different error messages for these two. We
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
432 # match the Python error message exactly.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
433 class ContinueOutsideLoop(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
434 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
435 Class defining the "Continue outside loop" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
436
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
437 Indicates a continue statement outside of a while or for loop.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
438 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
439 message_id = 'F22'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
440 message = '\'continue\' not properly in loop'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
441
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
442
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
443 class BreakOutsideLoop(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
444 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
445 Class defining the "Break outside loop" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
446
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
447 Indicates a break statement outside of a while or for loop.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
448 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
449 message_id = 'F23'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
450 message = '\'break\' outside loop'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
451
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
452
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
453 class ContinueInFinally(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
454 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
455 Class defining the "Continue in finally block" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
456
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
457 Indicates a continue statement in a finally block in a while or for loop.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
458 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
459 message_id = 'F24'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
460 message = '\'continue\' not supported inside \'finally\' clause'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
461
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
462
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
463 class DefaultExceptNotLast(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
464 """
5106
1ecc6c9abca5 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5067
diff changeset
465 Class defining the "Default except not being the last" message.
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
466
7064
1010f737def2 pyflakes: upgraded to version 2.1.1 plus repository changes to fix some issues (until 2019-07-09).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
467 Indicates an except: block as not the last exception handler.
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
468 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
469 message_id = 'F25'
5618
b50da40b6bc9 Remove M121 ignore comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5616
diff changeset
470 message = 'default \'except:\' must be last'
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
471
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
472
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
473 class TwoStarredExpressions(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
474 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
475 Class defining the "multiple starred expressions" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
476
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
477 Two or more starred expressions in an assignment (a, *b, *c = d).
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
478 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
479 message_id = 'F26'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
480 message = 'two starred expressions in assignment'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
481
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
482
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
483 class TooManyExpressionsInStarredAssignment(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
484 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
485 Class defining the "too many starred expressions" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
486
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
487 Too many expressions in an assignment with star-unpacking
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
488 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
489 message_id = 'F27'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
490 message = 'too many expressions in star-unpacking assignment'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
491
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
492
7617
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
493 class IfTuple(Message):
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
494 """
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
495 Class defining the "non-empty tuple literal" message.
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
496
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
497 Conditional test is a non-empty tuple literal, which are always True.
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
498 """
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
499 message_id = 'F49'
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
500 message = (
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
501 '\'if tuple literal\' is always true, perhaps remove accidental comma?'
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
502 )
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
503
a0e162a50ad7 Syntax Checker: updated pyflakes to version 2.2.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7395
diff changeset
504
5067
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
505 class AssertTuple(Message):
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
506 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
507 Class defining the "tuple assertion" message.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
508
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
509 Assertion test is a tuple, which are always True.
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
510 """
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
511 message_id = 'F28'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
512 message = 'assertion is always true, perhaps remove parentheses?'
e2f171f08af8 Updated pyflakes to 1.2.3+.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
513
6353
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
514
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
515 class ForwardAnnotationSyntaxError(Message):
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
516 """
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
517 Class defining the "forward annotation syntax error" message.
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
518
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
519 Found a syntax error in forward annotation.
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
520 """
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
521 message_id = 'F29'
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
522 message = 'syntax error in forward annotation %r'
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
523
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
524 def __init__(self, filename, loc, annotation):
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
525 """
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
526 Constructor
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
527
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
528 @param filename name of the file (string)
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
529 @param loc location of the issue
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
530 @param annotation erroneous forward annotation (string)
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
531 """
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
532 Message.__init__(self, filename, loc)
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
533 self.message_args = (annotation,)
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
534
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
535
6742
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
536 class CommentAnnotationSyntaxError(Message):
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
537 """
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
538 Class defining the "Comment Annotation Syntax Error" message.
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
539
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
540 Indicates a syntax error in a type comment.
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
541 """
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
542 message_id = 'F31'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
543 message = 'syntax error in type comment %r'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
544
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
545 def __init__(self, filename, loc, annotation):
6766
c722fcfb5f62 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6742
diff changeset
546 """
c722fcfb5f62 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6742
diff changeset
547 Constructor
c722fcfb5f62 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6742
diff changeset
548
c722fcfb5f62 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6742
diff changeset
549 @param filename name of the file (string)
c722fcfb5f62 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6742
diff changeset
550 @param loc location of the issue
c722fcfb5f62 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6742
diff changeset
551 @param annotation erroneous forward annotation (string)
c722fcfb5f62 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6742
diff changeset
552 """
6742
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
553 Message.__init__(self, filename, loc)
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
554 self.message_args = (annotation,)
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
555
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
556
6353
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
557 class RaiseNotImplemented(Message):
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
558 """
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
559 Class defining the "raise not implemented" message.
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
560
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
561 Use NotImplementedError instead of NotImplemented.
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
562 """
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
563 message_id = 'F30'
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
564 message = "'raise NotImplemented' should be 'raise NotImplementedError'"
6a0f3abd6878 upgraded pyflakes to version 2.0.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6048
diff changeset
565
6742
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
566
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
567 class InvalidPrintSyntax(Message):
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
568 """
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
569 Class defining the "Invalid Print Syntax" message.
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
570
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
571 Indicates the use of >> with a print function.
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
572 """
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
573 message_id = 'F32'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
574 message = 'use of >> is invalid with print function'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
575
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
576
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
577 class IsLiteral(Message):
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
578 """
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
579 Class defining the "Is Literal" message.
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
580
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
581 Indicates the use of "is" or "is not" against str, int and bytes.
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
582 """
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
583 message_id = 'F33'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
584 message = 'use ==/!= to compare str, bytes, and int literals'
7cb30f7f94f6 Upgraded pyflakes to 2.1.0
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 6645
diff changeset
585
7395
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
586
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
587 class FStringMissingPlaceholders(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
588 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
589 Class defining the "Missing Placeholder" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
590
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
591 Indicates that an f-string is missing some placeholders.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
592 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
593 message_id = 'F34'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
594 message = 'f-string is missing placeholders'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
595
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
596
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
597 class StringDotFormatExtraPositionalArguments(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
598 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
599 Class defining the "Unused Arguments" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
600
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
601 Indicates that an f-string has unused arguments.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
602 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
603 message_id = 'F35'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
604 message = "'...'.format(...) has unused arguments at position(s): %s"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
605
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
606 def __init__(self, filename, loc, extra_positions):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
607 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
608 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
609
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
610 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
611 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
612 @param extra_positions indexes of unused arguments
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
613 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
614 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
615 self.message_args = (extra_positions,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
616
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
617
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
618 class StringDotFormatExtraNamedArguments(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
619 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
620 Class defining the "Unused Named Arguments" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
621
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
622 Indicates that an f-string has unused named arguments.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
623 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
624 message_id = 'F36'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
625 message = "'...'.format(...) has unused named argument(s): %s"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
626
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
627 def __init__(self, filename, loc, extra_keywords):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
628 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
629 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
630
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
631 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
632 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
633 @param extra_keywords index of unused named arguments
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
634 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
635 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
636 self.message_args = (extra_keywords,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
637
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
638
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
639 class StringDotFormatMissingArgument(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
640 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
641 Class defining the "Missing Arguments" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
642
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
643 Indicates that an f-string is missing some arguments.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
644 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
645 message_id = 'F37'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
646 message = "'...'.format(...) is missing argument(s) for placeholder(s): %s"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
647
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
648 def __init__(self, filename, loc, missing_arguments):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
649 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
650 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
651
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
652 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
653 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
654 @param missing_arguments missing arguments
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
655 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
656 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
657 self.message_args = (missing_arguments,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
658
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
659
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
660 class StringDotFormatMixingAutomatic(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
661 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
662 Class defining the "Mixing Automatic and Manual" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
663
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
664 Indicates that an f-string mixes automatic and manual numbering.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
665 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
666 message_id = 'F38'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
667 message = "'...'.format(...) mixes automatic and manual numbering"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
668
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
669
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
670 class StringDotFormatInvalidFormat(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
671 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
672 Class defining the "Invalid Format String" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
673
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
674 Indicates that an f-string contains an invalid format string.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
675 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
676 message_id = 'F39'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
677 message = "'...'.format(...) has invalid format string: %s"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
678
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
679 def __init__(self, filename, loc, error):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
680 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
681 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
682
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
683 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
684 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
685 @param error error details
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
686 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
687 Message.__init__(self, filename, loc)
7963
19bbd56ac5f2 SyntaxChecker: fixed an issue in the pyflakes messages module causing an exception when trying to report back the result later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7960
diff changeset
688 if not isinstance(error, str):
19bbd56ac5f2 SyntaxChecker: fixed an issue in the pyflakes messages module causing an exception when trying to report back the result later on.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7960
diff changeset
689 error = str(error)
7395
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
690 self.message_args = (error,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
691
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
692
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
693 class PercentFormatInvalidFormat(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
694 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
695 Class defining the "Invalid Percent Format String" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
696
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
697 Indicates that a percent format has an invalid format string.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
698 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
699 message_id = 'F40'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
700 message = "'...' %% ... has invalid format string: %s"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
701
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
702 def __init__(self, filename, loc, error):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
703 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
704 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
705
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
706 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
707 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
708 @param error error details
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
709 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
710 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
711 self.message_args = (error,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
712
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
713
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
714 class PercentFormatMixedPositionalAndNamed(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
715 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
716 Class defining the "Mixed Positional and Named" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
717
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
718 Indicates that a percent format has mixed positional and named
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
719 placeholders.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
720 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
721 message_id = 'F41'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
722 message = "'...' %% ... has mixed positional and named placeholders"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
723
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
724
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
725 class PercentFormatUnsupportedFormatCharacter(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
726 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
727 Class defining the "Unsupported Format Character" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
728
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
729 Indicates that a percent format has an unsupported format character.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
730 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
731 message_id = 'F42'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
732 message = "'...' %% ... has unsupported format character %r"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
733
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
734 def __init__(self, filename, loc, c):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
735 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
736 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
737
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
738 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
739 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
740 @param c unsupported format character
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
741 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
742 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
743 self.message_args = (c,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
744
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
745
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
746 class PercentFormatPositionalCountMismatch(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
747 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
748 Class defining the "Placeholder Substitution Mismatch" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
749
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
750 Indicates that a percent format has a mismatching number of placeholders
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
751 and substitutions.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
752 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
753 message_id = 'F43'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
754 message = "'...' %% ... has %d placeholder(s) but %d substitution(s)"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
755
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
756 def __init__(self, filename, loc, n_placeholders, n_substitutions):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
757 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
758 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
759
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
760 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
761 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
762 @param n_placeholders number of placeholders (integer)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
763 @param n_substitutions number of substitutions (integer)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
764 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
765 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
766 self.message_args = (n_placeholders, n_substitutions)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
767
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
768
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
769 class PercentFormatExtraNamedArguments(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
770 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
771 Class defining the "Unused Named Arguments" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
772
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
773 Indicates that a percent format has unused named arguments.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
774 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
775 message_id = 'F44'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
776 message = "'...' %% ... has unused named argument(s): %s"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
777
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
778 def __init__(self, filename, loc, extra_keywords):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
779 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
780 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
781
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
782 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
783 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
784 @param extra_keywords index of unused named arguments
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
785 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
786 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
787 self.message_args = (extra_keywords,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
788
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
789
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
790 class PercentFormatMissingArgument(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
791 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
792 Class defining the "Missing Arguments" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
793
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
794 Indicates that a percent format is missing arguments for some placeholders.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
795 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
796 message_id = 'F45'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
797 message = "'...' %% ... is missing argument(s) for placeholder(s): %s"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
798
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
799 def __init__(self, filename, loc, missing_arguments):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
800 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
801 Constructor
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
802
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
803 @param filename name of the file (string)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
804 @param loc location of the issue
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
805 @param missing_arguments missing arguments
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
806 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
807 Message.__init__(self, filename, loc)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
808 self.message_args = (missing_arguments,)
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
809
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
810
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
811 class PercentFormatExpectedMapping(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
812 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
813 Class defining the "Sequence instead of Mapping" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
814
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
815 Indicates that a percent format expected a mapping but got a sequence.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
816 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
817 message_id = 'F46'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
818 message = "'...' %% ... expected mapping but got sequence"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
819
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
820
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
821 class PercentFormatExpectedSequence(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
822 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
823 Class defining the "Mapping instead of Sequence" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
824
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
825 Indicates that a percent format expected a sequence but got a mapping.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
826 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
827 message_id = 'F47'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
828 message = "'...' %% ... expected sequence but got mapping"
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
829
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
830
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
831 class PercentFormatStarRequiresSequence(Message):
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
832 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
833 Class defining the "'*' Requires Sequence" message.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
834
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
835 Indicates that a percent format expected a sequence.
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
836 """
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
837 message_id = 'F48'
dd50d0f4c588 pyflakes: updated to repository as of 2020-02-03.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
838 message = "'...' %% ... `*` specifier requires sequence"

eric ide

mercurial