Plugins/CheckerPlugins/SyntaxChecker/pyflakes/messages.py

changeset 4502
76f2b46437a6
parent 4021
195a471c327b
child 4541
e8ddd9d76414
equal deleted inserted replaced
4501:3224f20d8eb0 4502:76f2b46437a6
246 """ 246 """
247 Message.__init__(self, filename, loc) 247 Message.__init__(self, filename, loc)
248 self.message_args = (name,) 248 self.message_args = (name,)
249 249
250 250
251 class Redefined(Message):
252 """
253 Class defining the "Redefined" message.
254 """
255 message_id = 'F09'
256 message = 'redefinition of %r from line %r'
257
258 def __init__(self, filename, loc, name, orig_loc):
259 """
260 Constructor
261
262 @param filename name of the file (string)
263 @param loc location of the issue
264 @param name name of the redefined function (string)
265 @param orig_loc location of the original definition
266 """
267 Message.__init__(self, filename, loc)
268 self.message_args = (name, orig_loc.lineno)
269
270
271 class LateFutureImport(Message): 251 class LateFutureImport(Message):
272 """ 252 """
273 Class defining the "Late Future Import" message. 253 Class defining the "Late Future Import" message.
274 """ 254 """
275 message_id = 'F10' 255 message_id = 'F10'
315 295
316 Indicates a return statement with arguments inside a generator. 296 Indicates a return statement with arguments inside a generator.
317 """ 297 """
318 message_id = 'F14' 298 message_id = 'F14'
319 message = '\'return\' with argument inside generator' 299 message = '\'return\' with argument inside generator'
300
301
302 class ReturnOutsideFunction(Message):
303 """
304 Class defining the "Return outside function" message.
305
306 Indicates a return statement outside of a function/method.
307 """
308 message_id = 'F15'
309 message = '\'return\' outside function'

eric ide

mercurial