src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Naming/NamingStyleChecker.py

branch
eric7
changeset 11163
f6c0a18254d6
parent 11150
73d80859079c
equal deleted inserted replaced
11162:72c5e052996a 11163:f6c0a18254d6
638 @param node AST node to check 638 @param node AST node to check
639 @type ast.AST 639 @type ast.AST
640 @param _parents list of parent nodes (unused) 640 @param _parents list of parent nodes (unused)
641 @type list of ast.AST 641 @type list of ast.AST
642 """ 642 """
643 if self.__filename: 643 if self.filename:
644 moduleName = os.path.splitext(os.path.basename(self.__filename))[0] 644 moduleName = os.path.splitext(os.path.basename(self.filename))[0]
645 if moduleName.lower() != moduleName: 645 if moduleName.lower() != moduleName:
646 self.addErrorFromNode(node, "N-807") 646 self.addErrorFromNode(node, "N-807")
647 647
648 if moduleName == "__init__": 648 if moduleName == "__init__":
649 # we got a package 649 # we got a package
650 packageName = os.path.split(os.path.dirname(self.__filename))[1] 650 packageName = os.path.split(os.path.dirname(self.filename))[1]
651 if packageName.lower() != packageName: 651 if packageName.lower() != packageName:
652 self.addErrorFromNode(node, "N-808") 652 self.addErrorFromNode(node, "N-808")
653 653
654 def __checkImportAs(self, node, _parents): 654 def __checkImportAs(self, node, _parents):
655 """ 655 """

eric ide

mercurial