diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-04-18 19:07:56 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-04-18 19:07:56 +0100 |
commit | ed6ebb9a4d262c4e08858a09b7bb376901014c8b (patch) | |
tree | 4e084f6aa01398cf8ee9ba70ce8ee40f9421f45b /python/olm/inbound_group_session.py | |
parent | 001dc1edaa4c5306fbb7c625202788458dadeafa (diff) |
PEP8 for python bindings
make the python code adhere to PEP8
Diffstat (limited to 'python/olm/inbound_group_session.py')
-rw-r--r-- | python/olm/inbound_group_session.py | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/python/olm/inbound_group_session.py b/python/olm/inbound_group_session.py index 4390b34..be26f6c 100644 --- a/python/olm/inbound_group_session.py +++ b/python/olm/inbound_group_session.py @@ -11,6 +11,7 @@ lib.olm_inbound_group_session.restype = c_void_p lib.olm_inbound_group_session_last_error.argtypes = [c_void_p] lib.olm_inbound_group_session_last_error.restype = c_char_p + def inbound_group_session_errcheck(res, func, args): if res == ERR: raise OlmError("%s: %s" % ( @@ -26,10 +27,12 @@ def inbound_group_session_function(func, *types): inbound_group_session_function( - lib.olm_pickle_inbound_group_session, c_void_p, c_size_t, c_void_p, c_size_t + lib.olm_pickle_inbound_group_session, + c_void_p, c_size_t, c_void_p, c_size_t, ) inbound_group_session_function( - lib.olm_unpickle_inbound_group_session, c_void_p, c_size_t, c_void_p, c_size_t + lib.olm_unpickle_inbound_group_session, + c_void_p, c_size_t, c_void_p, c_size_t, ) inbound_group_session_function( @@ -45,19 +48,28 @@ inbound_group_session_function( ) inbound_group_session_function( lib.olm_group_decrypt, - c_void_p, c_size_t, # message - c_void_p, c_size_t, # plaintext - POINTER(c_uint32), # message_index + c_void_p, c_size_t, # message + c_void_p, c_size_t, # plaintext + POINTER(c_uint32), # message_index ) -inbound_group_session_function(lib.olm_inbound_group_session_id_length) -inbound_group_session_function(lib.olm_inbound_group_session_id, c_void_p, c_size_t) +inbound_group_session_function( + lib.olm_inbound_group_session_id_length, +) +inbound_group_session_function( + lib.olm_inbound_group_session_id, + c_void_p, c_size_t, +) lib.olm_inbound_group_session_first_known_index.argtypes = (c_void_p,) lib.olm_inbound_group_session_first_known_index.restypes = c_uint32 -inbound_group_session_function(lib.olm_export_inbound_group_session_length) -inbound_group_session_function(lib.olm_export_inbound_group_session, c_void_p, c_size_t, c_uint32) +inbound_group_session_function( + lib.olm_export_inbound_group_session_length, +) +inbound_group_session_function( + lib.olm_export_inbound_group_session, c_void_p, c_size_t, c_uint32, +) class InboundGroupSession(object): |