Index: geniuswebcore/geniusweb/protocol/session/DefaultSessionState.py
===================================================================
--- geniuswebcore/geniusweb/protocol/session/DefaultSessionState.py	(revision 87)
+++ geniuswebcore/geniusweb/protocol/session/DefaultSessionState.py	(revision 88)
@@ -12,10 +12,9 @@
 from geniusweb.utils import toTuple, val
 
-
-S = TypeVar('S',bound=SessionSettings)   
-P = TypeVar('P',bound="DefaultSessionState")
-
-
-class DefaultSessionState (SessionState, Generic[P,S]):
+S = TypeVar('S', bound=SessionSettings)   
+P = TypeVar('P', bound="DefaultSessionState")
+
+
+class DefaultSessionState (SessionState, Generic[P, S]):
 	'''
 	The default current state of the session. immutable.
@@ -29,9 +28,8 @@
 	# 	partyprofiles: Optional[Dict[PartyId, PartyWithProfile]]
 	# 	settings: S
-	
 
 	def __init__(self, actions:List[Action], connections:List[PartyId],
 			progress:Optional[Progress], settings:S,
-			partyprofiles:Optional[Dict[PartyId, PartyWithProfile]]=None, 
+			partyprofiles:Optional[Dict[PartyId, PartyWithProfile]]=None,
 			error:Optional[ProtocolException]=None):
 		'''
@@ -63,5 +61,5 @@
 		if len(self._connections) != len(set(self._connections)):
 			raise ValueError("There can not be multiple connections for a party:"
-							+ str(self._connections))
+							+str(self._connections))
 
 		if not settings:
@@ -72,7 +70,7 @@
 
 	@abstractmethod
-	def With(self,actions1:List[Action] ,  conns:List[PartyId],
+	def With(self, actions1:List[Action] , conns:List[PartyId],
 			progress1:Optional[Progress] , settings1:S,
-			partyprofiles1:Dict[PartyId, PartyWithProfile] , e: Optional[ProtocolException]) -> P :
+			partyprofiles1:Dict[PartyId, PartyWithProfile] , e: Optional[ProtocolException]) -> P:
 		'''
 		Construct a new session state, where the DefaultSessionState changes
@@ -93,5 +91,5 @@
 		'''
 
-	def getConnections(self)->List[PartyId] :
+	def getConnections(self) -> List[PartyId]:
 		'''
 		@return existing connections.
@@ -99,5 +97,5 @@
 		return list(self._connections)
 
-	def getPartyProfiles(self)->Dict[PartyId, PartyWithProfile] :
+	def getPartyProfiles(self) -> Dict[PartyId, PartyWithProfile]:
 		'''
 		@return map with {@link PartyWithProfile} for the parties. May be an
@@ -107,5 +105,5 @@
 		return dict(self._partyprofiles)
 
-	def getActions(self)->List[Action] :
+	def getActions(self) -> List[Action]:
 		'''
 		@return unmodifyable list of actions done so far.
@@ -113,15 +111,15 @@
 		return list(self._actions)
 
-	def getProgress(self)->Optional[Progress] :
+	def getProgress(self) -> Optional[Progress]:
 		return self._progress
 
-	def getSettings(self)->S :
+	def getSettings(self) -> S:
 		return self._settings
 
-	def isFinal(self,currentTimeMs:int) ->bool :
+	def isFinal(self, currentTimeMs:int) -> bool:
 		return self._error != None or \
-			(self._progress!=None and self._progress.isPastDeadline(currentTimeMs)) #type:ignore
-
-	def getError(self)-> Optional[ProtocolException]:
+			(self._progress != None and self._progress.isPastDeadline(currentTimeMs))  # type:ignore
+
+	def getError(self) -> Optional[ProtocolException]:
 		'''
 		@return an error that occured that caused the session to
@@ -132,9 +130,9 @@
 		return self._error
 
-	def WithDeadlineReached(self)->P :
-		return self.With(self._actions, self._connections, val(self._progress), self._settings, 
+	def WithDeadlineReached(self) -> P:
+		return self.With(self._actions, self._connections, val(self._progress), self._settings,
 				self._partyprofiles, self._error) 
 
-	def WithoutParty(self, party:PartyId )->P :
+	def WithoutParty(self, party:PartyId) -> P:
 		assert isinstance(party, PartyId)
 		newconn = list(self._connections)
@@ -143,5 +141,5 @@
 				self._settings, self._partyprofiles, self._error)
 
-	def WithException(self, e:ProtocolException)-> P:
+	def WithException(self, e:ProtocolException) -> P:
 		'''
 		@param e the error that occured
@@ -149,8 +147,8 @@
 		'''
 		assert isinstance(e, ProtocolException)
-		return self.With(self._actions, self._connections, val(self._progress), 
+		return self.With(self._actions, self._connections, self._progress,
 						self._settings, self._partyprofiles, e)
 
-	def WithParty(self, connection:PartyId,  partyprofile:PartyWithProfile) -> P :
+	def WithParty(self, connection:PartyId, partyprofile:PartyWithProfile) -> P:
 		assert isinstance(connection, PartyId)
 		assert isinstance(partyprofile, PartyWithProfile)
@@ -158,9 +156,9 @@
 		newconns.append(connection)
 		newprofiles = dict(self.getPartyProfiles())
-		newprofiles[connection]= partyprofile
+		newprofiles[connection] = partyprofile
 		return self.With(self.getActions(), newconns, self._progress, self.getSettings(),
 				newprofiles, None)
 
-	def WithProgress(self,newprogress:Progress )->P :
+	def WithProgress(self, newprogress:Progress) -> P:
 		'''
 		Sets the new progress for this session.
@@ -172,8 +170,8 @@
 		if not newprogress:
 			raise ValueError("newprogress must be not null");
-		return self.With(self._actions, self._connections, newprogress, self._settings, 
-						self._partyprofiles,self._error)
-
-	def WithAction(self,actor:PartyId , action:Action )->P :
+		return self.With(self._actions, self._connections, newprogress, self._settings,
+						self._partyprofiles, self._error)
+
+	def WithAction(self, actor:PartyId , action:Action) -> P:
 		'''
 		@param actor  the actor that did this action. Can be used to check if
@@ -189,6 +187,6 @@
 		newactions = list(self.getActions())
 		newactions.append(action)
-		return self.With(newactions, self._connections, val(self._progress), 
-				self._settings, self._partyprofiles,self._error)
+		return self.With(newactions, self._connections, val(self._progress),
+				self._settings, self._partyprofiles, self._error)
 
 	def checkAction(self, actor:PartyId , action:Action) -> Optional[str]:
@@ -198,5 +196,5 @@
 		@return null if action seems ok, or message explaining why not.
 		'''
-		if not actor :
+		if not actor:
 			return "actor must not be null"
 		if not action:
@@ -206,7 +204,7 @@
 		return None
 
-	def __repr__(self)->str:
+	def __repr__(self) -> str:
 		return type(self).__name__ + "[" + str(self._actions) + ","\
-				+ str(self._connections) + "," + str(self._progress) + "," + \
+				+str(self._connections) + "," + str(self._progress) + "," + \
 				str(self._settings) + "," + str(self._error);
 
@@ -219,5 +217,5 @@
 		return isinstance(other, self.__class__) and \
 			self._partyprofiles == other._partyprofiles and \
-			self._actions==other._actions and \
+			self._actions == other._actions and \
 			self._connections == other._connections and \
 			self._progress == other._progress and \
