flake8 format

main
Bob Mottram 2020-04-04 15:17:48 +01:00
parent dc2386c583
commit bb12ce191e
1 changed files with 21 additions and 21 deletions

View File

@ -6,7 +6,6 @@ __maintainer__="Bob Mottram"
__email__ = "bob@freedombone.net" __email__ = "bob@freedombone.net"
__status__ = "Production" __status__ = "Production"
import json
def getXmppAddress(actorJson: {}) -> str: def getXmppAddress(actorJson: {}) -> str:
"""Returns xmpp address for the given actor """Returns xmpp address for the given actor
@ -17,7 +16,7 @@ def getXmppAddress(actorJson: {}) -> str:
if not propertyValue.get('name'): if not propertyValue.get('name'):
continue continue
nameLower = propertyValue['name'].lower() nameLower = propertyValue['name'].lower()
if not (nameLower.startswith('xmpp') or \ if not (nameLower.startswith('xmpp') or
nameLower.startswith('jabber')): nameLower.startswith('jabber')):
continue continue
if not propertyValue.get('type'): if not propertyValue.get('type'):
@ -33,6 +32,7 @@ def getXmppAddress(actorJson: {}) -> str:
return propertyValue['value'] return propertyValue['value']
return '' return ''
def setXmppAddress(actorJson: {}, xmppAddress: str) -> None: def setXmppAddress(actorJson: {}, xmppAddress: str) -> None:
"""Sets an xmpp address for the given actor """Sets an xmpp address for the given actor
""" """
@ -46,7 +46,7 @@ def setXmppAddress(actorJson: {},xmppAddress: str) -> None:
continue continue
if not propertyValue.get('type'): if not propertyValue.get('type'):
continue continue
if not (propertyValue['name'].lower().startswith('xmpp') or \ if not (propertyValue['name'].lower().startswith('xmpp') or
propertyValue['name'].lower().startswith('jabber')): propertyValue['name'].lower().startswith('jabber')):
continue continue
propertyFound = propertyValue propertyFound = propertyValue
@ -67,7 +67,7 @@ def setXmppAddress(actorJson: {},xmppAddress: str) -> None:
if not propertyValue.get('type'): if not propertyValue.get('type'):
continue continue
nameLower = propertyValue['name'].lower() nameLower = propertyValue['name'].lower()
if not (nameLower.startswith('xmpp') or \ if not (nameLower.startswith('xmpp') or
nameLower.startswith('jabber')): nameLower.startswith('jabber')):
continue continue
if propertyValue['type'] != 'PropertyValue': if propertyValue['type'] != 'PropertyValue':