Mon, 16 Sep 2019 18:56:09 +0200
jasy: some fixes for syntax warnings.
--- a/eric6/ThirdParty/Jasy/jasy/parse/AbstractNode.py Mon Sep 16 18:42:22 2019 +0200 +++ b/eric6/ThirdParty/Jasy/jasy/parse/AbstractNode.py Mon Sep 16 18:56:09 2019 +0200 @@ -330,7 +330,7 @@ """Returns the source code of the node""" if not self.tokenizer: - raise Exception("Could not find source for node '%s'" % node.type) + raise Exception("Could not find source for node '%s'" % self.type) if getattr(self, "start", None) is not None: if getattr(self, "end", None) is not None:
--- a/eric6/ThirdParty/Jasy/jasy/script/output/Compressor.py Mon Sep 16 18:42:22 2019 +0200 +++ b/eric6/ThirdParty/Jasy/jasy/script/output/Compressor.py Mon Sep 16 18:56:09 2019 +0200 @@ -285,7 +285,7 @@ result += "(%s)" % self.compress(node[1]) else: parent = getattr(node, "parent", None) - if parent and parent.type is "dot": + if parent and parent.type == "dot": result += "()" return result
--- a/eric6/ThirdParty/Jasy/jasy/script/parse/Parser.py Mon Sep 16 18:42:22 2019 +0200 +++ b/eric6/ThirdParty/Jasy/jasy/script/parse/Parser.py Mon Sep 16 18:56:09 2019 +0200 @@ -480,7 +480,7 @@ elif tokenType == "catch" or tokenType == "finally": - raise SyntaxError(tokens[tokenType] + " without preceding try", tokenizer) + raise SyntaxError(tokenType + " without preceding try", tokenizer) elif tokenType == "throw":
--- a/eric6/ThirdParty/Jasy/jasy/script/tokenize/Tokenizer.py Mon Sep 16 18:42:22 2019 +0200 +++ b/eric6/ThirdParty/Jasy/jasy/script/tokenize/Tokenizer.py Mon Sep 16 18:56:09 2019 +0200 @@ -162,7 +162,7 @@ startLine = self.line # Whether this is the first called as happen on start parsing a file (eat leading comments/white space) - startOfFile = self.cursor is 0 + startOfFile = self.cursor == 0 indent = "" @@ -254,7 +254,7 @@ try: self.comments.append(Comment.Comment(text, mode, self.line-1, "", self.fileId)) - except Comment.CommentException: + except Comment.CommentException as commentError: Console.error("Ignoring comment in %s: %s", self.fileId, commentError) # check for whitespace, also for special cases like 0xA0