eric6/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8043
0acf98cd089a
parent 8168
bdb0258faf42
child 8273
698ae46f40a4
diff -r e01ae92db699 -r 31965986ecd1 eric6/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py	Sat Mar 06 10:00:52 2021 +0100
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/Miscellaneous/MiscellaneousChecker.py	Sun Mar 28 15:00:11 2021 +0200
@@ -17,7 +17,7 @@
 
 import AstUtilities
 
-from eradicate import Eradicator
+from .eradicate import Eradicator
 
 from .MiscellaneousDefaults import MiscellaneousCheckerDefaultArgs
 
@@ -160,7 +160,7 @@
                            if b not in self.BuiltinsWhiteList]
         
         self.__eradicator = Eradicator()
-
+        
         # statistics counters
         self.counters = {}
         
@@ -288,8 +288,7 @@
         @return generated AST
         @rtype ast.AST
         """
-        source = "".join(self.__source)
-        return compile(source, self.__filename, 'exec', ast.PyCF_ONLY_AST)
+        return ast.parse("".join(self.__source), self.__filename)
     
     def run(self):
         """

eric ide

mercurial