diff -r 349308e84eeb -r 772103b14c18 eric6/Project/Project.py --- a/eric6/Project/Project.py Mon Apr 12 19:05:23 2021 +0200 +++ b/eric6/Project/Project.py Mon Apr 12 19:21:40 2021 +0200 @@ -3540,9 +3540,7 @@ @return default extension (including the dot) (string) """ lang = self.pdata["PROGLANGUAGE"] - if lang == "": - lang = "Python3" - elif lang == "Python": + if lang in ("", "Python"): lang = "Python3" return self.__sourceExtensions(lang)[0] @@ -3796,11 +3794,10 @@ """ newfn = os.path.abspath(fn) newfn = self.getRelativePath(newfn) - if newfn in self.pdata[group]: - return True - elif ( - group == "OTHERS" and - any(newfn.startswith(entry) for entry in self.pdata[group]) + if ( + newfn in self.pdata[group] or + (group == "OTHERS" and + any(newfn.startswith(entry) for entry in self.pdata[group])) ): return True @@ -4723,17 +4720,11 @@ (filetype == "RESOURCES" and fn not in self.pdata["RESOURCES"]) or (filetype == "OTHERS" and - fn not in self.pdata["OTHERS"]) - ): - if autoInclude and AI: - self.appendFile(ns) - else: - newFiles.append(ns) - elif ( - filetype == "TRANSLATIONS" and - fn not in self.pdata["TRANSLATIONS"] and - (fnmatch.fnmatch(ns, pattern) or - fnmatch.fnmatch(ns, binpattern)) + fn not in self.pdata["OTHERS"]) or + (filetype == "TRANSLATIONS" and + fn not in self.pdata["TRANSLATIONS"] and + (fnmatch.fnmatch(ns, pattern) or + fnmatch.fnmatch(ns, binpattern))) ): if autoInclude and AI: self.appendFile(ns)