--- a/eric6/VirtualEnv/VirtualenvExecDialog.py Fri Apr 02 11:59:41 2021 +0200 +++ b/eric6/VirtualEnv/VirtualenvExecDialog.py Sat May 01 14:27:20 2021 +0200 @@ -39,7 +39,7 @@ @param parent reference to the parent widget @type QWidget """ - super(VirtualenvExecDialog, self).__init__(parent) + super().__init__(parent) self.setupUi(self) self.buttonBox.button( @@ -261,10 +261,11 @@ Private method to write a log file to the virtualenv directory. """ outtxt = self.contents.toPlainText() - if self.__pyvenv: - logFile = os.path.join(self.__targetDir, "pyvenv.log") - else: - logFile = os.path.join(self.__targetDir, "virtualenv.log") + logFile = ( + os.path.join(self.__targetDir, "pyvenv.log") + if self.__pyvenv else + os.path.join(self.__targetDir, "virtualenv.log") + ) self.__logOutput(self.tr("\nWriting log file '{0}'.\n") .format(logFile)) @@ -287,10 +288,7 @@ """ Private method to write a script file to the virtualenv directory. """ - if self.__pyvenv: - basename = "create_pyvenv" - else: - basename = "create_virtualenv" + basename = "create_pyvenv" if self.__pyvenv else "create_virtualenv" if isWindowsPlatform(): script = os.path.join(self.__targetDir, basename + ".cmd") txt = self.__cmd