--- a/TimeTracker/TimeTrackEntry.py Thu Apr 09 18:44:42 2020 +0200 +++ b/TimeTracker/TimeTrackEntry.py Tue Jun 23 19:40:26 2020 +0200 @@ -7,12 +7,6 @@ Module implementing the time track entry class. """ -from __future__ import unicode_literals -try: - str = unicode # __IGNORE_EXCEPTION__ -except NameError: - pass - from PyQt5.QtCore import Qt, QDateTime, QTime @@ -222,9 +216,11 @@ """ if startDateTime.isValid(): self.__startDateTime = startDateTime - self.__valid = self.__startDateTime.isValid() and \ + self.__valid = ( + self.__startDateTime.isValid() and self.__duration >= self.__plugin.getPreferences( "MinimumDuration") + ) def getDuration(self): """ @@ -242,9 +238,11 @@ """ if duration >= self.__plugin.getPreferences("MinimumDuration"): self.__duration = duration - self.__valid = self.__startDateTime.isValid() and \ + self.__valid = ( + self.__startDateTime.isValid() and self.__duration >= self.__plugin.getPreferences( "MinimumDuration") + ) def addDuration(self, duration): """ @@ -270,9 +268,10 @@ @param description task description (string) """ - self.__task = description.replace("\r\n", " ")\ - .replace("\n", " ")\ - .replace("\r", " ") + self.__task = ( + description.replace("\r\n", " ").replace("\n", " ") + .replace("\r", " ") + ) def getComment(self): """ @@ -288,9 +287,9 @@ @param comment comment to set (string) """ - self.__comment = comment.replace("\r\n", " ")\ - .replace("\n", " ")\ - .replace("\r", " ") + self.__comment = ( + comment.replace("\r\n", " ").replace("\n", " ").replace("\r", " ") + ) def getEntryData(self): """