From bb2a35f2d62e790cc52d15729137f3f0206e19e8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 25 Sep 2021 00:06:40 +0200 Subject: [PATCH] name refactor --- InvenTree/plugins/integration/integration.py | 24 +++++++++----------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/InvenTree/plugins/integration/integration.py b/InvenTree/plugins/integration/integration.py index 916947d768..4a0aafc8ff 100644 --- a/InvenTree/plugins/integration/integration.py +++ b/InvenTree/plugins/integration/integration.py @@ -161,23 +161,21 @@ class GitStatus: class Definition: key: str = 'N' status: int = 2 - msg_sign: str = '' - msg_key: str = '' + msg: str = '' - def __init__(self, key: str = 'N', status: int = 2, msg_sign: str = '', msg_key: str = '') -> None: + def __init__(self, key: str = 'N', status: int = 2, msg: str = '') -> None: self.key = key self.status = status - self.msg_sign = msg_sign - self.msg_key = msg_key + self.msg = msg - N = Definition(key='N', status=2, msg_sign='no signature',) - G = Definition(key='G', status=0, msg_sign='valid signature',) - B = Definition(key='B', status=2, msg_sign='bad signature',) - U = Definition(key='U', status=1, msg_sign='good signature, unknown validity',) - X = Definition(key='X', status=1, msg_sign='good signature, expired',) - Y = Definition(key='Y', status=1, msg_sign='good signature, expired key',) - R = Definition(key='R', status=2, msg_sign='good signature, revoked key',) - E = Definition(key='E', status=1, msg_sign='cannot be checked',) + N = Definition(key='N', status=2, msg='no signature',) + G = Definition(key='G', status=0, msg='valid signature',) + B = Definition(key='B', status=2, msg='bad signature',) + U = Definition(key='U', status=1, msg='good signature, unknown validity',) + X = Definition(key='X', status=1, msg='good signature, expired',) + Y = Definition(key='Y', status=1, msg='good signature, expired key',) + R = Definition(key='R', status=2, msg='good signature, revoked key',) + E = Definition(key='E', status=1, msg='cannot be checked',) class IntegrationPlugin(MixinBase, plugin.InvenTreePlugin):