--- a/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/messages.py Thu Dec 08 15:10:49 2022 +0100 +++ b/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/pyflakes/messages.py Thu Dec 08 16:01:34 2022 +0100 @@ -344,16 +344,16 @@ message_id = "F10" message = "from __future__ imports must occur at the beginning of the file" - - def __init__(self, filename, loc): - """ - Constructor - - @param filename name of the file (string) - @param loc location of the issue - """ - Message.__init__(self, filename, loc) - self.message_args = () +## + ##def __init__(self, filename, loc): + ##""" + ##Constructor +## + ##@param filename name of the file (string) + ##@param loc location of the issue + ##""" + ##Message.__init__(self, filename, loc) + ##self.message_args = () class FutureFeatureNotDefined(Message): @@ -399,6 +399,21 @@ self.message_args = (names,) +class UnusedAnnotation(Message): + """ + Class defining the "Unused Annotation" message + + Indicates that a variable has been explicitly annotated but not actually + used. + """ + message_id = "F12" + message = 'local variable %r is annotated but never used' + + def __init__(self, filename, loc, names): + Message.__init__(self, filename, loc) + self.message_args = (names,) + + class ReturnOutsideFunction(Message): """ Class defining the "Return outside function" message. @@ -533,28 +548,6 @@ self.message_args = (annotation,) -class CommentAnnotationSyntaxError(Message): - """ - Class defining the "Comment Annotation Syntax Error" message. - - Indicates a syntax error in a type comment. - """ - - message_id = "F31" - message = "syntax error in type comment %r" - - def __init__(self, filename, loc, annotation): - """ - Constructor - - @param filename name of the file (string) - @param loc location of the issue - @param annotation erroneous forward annotation (string) - """ - Message.__init__(self, filename, loc) - self.message_args = (annotation,) - - class RaiseNotImplemented(Message): """ Class defining the "raise not implemented" message.