From 2caf6f63259988c1ef08aa12a852e875fb9c7af2 Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 21 Jan 2024 23:59:11 +0100 Subject: Code formatting --- squaredeal/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/squaredeal/__init__.py b/squaredeal/__init__.py index 9c6e961..b6aa7bf 100644 --- a/squaredeal/__init__.py +++ b/squaredeal/__init__.py @@ -157,11 +157,13 @@ class SquareDeal(object): try: self.phases[phase_no-1].s_keys[session_no-1] = lineparts[1] except IndexError: - raise SquareDealError('Session %s from SQK not declared in SQD' % (lineparts[0])) + raise SquareDealError( + 'Session %s from SQK not declared in SQD' % (lineparts[0])) for ph_idx, phase in enumerate(self.phases): for s_idx, s_key in enumerate(phase.s_keys): if s_key is None: - raise SquareDealError('Session %d,%d missing a key in SQK' % (ph_idx+1, s_idx+1)) + raise SquareDealError( + 'Session %d,%d missing a key in SQK' % (ph_idx+1, s_idx+1)) sqk_hash = self._get_file_hash(sqkpath) if sqk_hash != self.hash: raise SquareDealError( @@ -193,8 +195,10 @@ class SquareDeal(object): for ph_idx, phase in enumerate(self.phases): for s_idx, session_key in enumerate(phase.s_keys): if session_key is None: - raise SquareDealError('Missing session key for session %d,%d' % (ph_idx+1, s_idx+1)) - sqkfile.write(('%d,%d:%s\r\n' % (ph_idx+1, s_idx+1, session_key)).encode('utf8')) + raise SquareDealError( + 'Missing session key for session %d,%d' % (ph_idx+1, s_idx+1)) + sqkfile.write( + ('%d,%d:%s\r\n' % (ph_idx+1, s_idx+1, session_key)).encode('utf8')) self.hash = self._get_file_hash(sqkpath) def tofile(self, sqdpath, sqkpath=None, make_backups=True): -- cgit v1.2.3