--- a/eric6/Graphics/ApplicationDiagramBuilder.py Sat Sep 21 16:04:17 2019 +0200 +++ b/eric6/Graphics/ApplicationDiagramBuilder.py Sat Sep 21 17:41:22 2019 +0200 @@ -53,8 +53,11 @@ @return dictionary of modules contained in the application. """ import Utilities.ModuleParser - extensions = Preferences.getPython("PythonExtensions") + \ - Preferences.getPython("Python3Extensions") + ['.rb'] + extensions = ( + Preferences.getPython("PythonExtensions") + + Preferences.getPython("Python3Extensions") + + ['.rb'] + ) moduleDict = {} mods = self.project.pdata["SOURCES"] modules = [] @@ -94,8 +97,10 @@ """ Public method to build the packages shapes of the diagram. """ - project = os.path.splitdrive(self.project.getProjectPath())[1]\ + project = ( + os.path.splitdrive(self.project.getProjectPath())[1] .replace(os.sep, '.')[1:] + ) packages = {} shapes = {} p = 10 @@ -152,8 +157,10 @@ ppath = os.path.dirname(ppath) hasInit = len(glob.glob(os.path.join( ppath, '__init__.*'))) > 0 - shortPackage = packagePath.replace(ppath, '')\ + shortPackage = ( + packagePath.replace(ppath, '') .replace(os.sep, '.')[1:] + ) packageList = shortPackage.split('.')[1:] packageListLen = len(packageList) i = '.'.join( @@ -180,8 +187,10 @@ impLst.append(n) for imp in impLst: impPackage = '.'.join(imp.split('.')[:-1]) - if impPackage not in packages[package][1] and \ - not impPackage == package: + if ( + impPackage not in packages[package][1] and + not impPackage == package + ): packages[package][1].append(impPackage) sortedkeys = sorted(packages.keys()) @@ -271,9 +280,11 @@ @return flag indicating success (boolean) """ parts = data.split(", ") - if len(parts) != 2 or \ - not parts[0].startswith("project=") or \ - not parts[1].startswith("no_modules="): + if ( + len(parts) != 2 or + not parts[0].startswith("project=") or + not parts[1].startswith("no_modules=") + ): return False projectFile = parts[0].split("=", 1)[1].strip()