flake8 format

main
Bob Mottram 2020-04-03 08:54:53 +00:00
parent dfb1263f1a
commit 9b713efb86
1 changed files with 30 additions and 26 deletions

View File

@ -6,13 +6,13 @@ __maintainer__="Bob Mottram"
__email__ = "bob@freedombone.net"
__status__ = "Production"
import json
def getDonationTypes() -> str:
return ('patreon','paypal','gofundme','liberapay', \
'kickstarter','indiegogo','crowdsupply', \
return ('patreon', 'paypal', 'gofundme', 'liberapay',
'kickstarter', 'indiegogo', 'crowdsupply',
'subscribestar')
def getDonationUrl(actorJson: {}) -> str:
"""Returns a link used for donations
"""
@ -37,6 +37,7 @@ def getDonationUrl(actorJson: {}) -> str:
return donateUrl.split('"')[0]
return ''
def setDonationUrl(actorJson: {}, donateUrl: str) -> None:
"""Sets a link used for donations
"""
@ -65,7 +66,10 @@ def setDonationUrl(actorJson: {},donateUrl: str) -> None:
if propertyFound:
actorJson['attachment'].remove(propertyFound)
donateValue='<a href="'+donateUrl+'" rel="me nofollow noopener noreferrer" target="_blank">'+donateUrl+'</a>'
donateValue = \
'<a href="' + donateUrl + \
'" rel="me nofollow noopener noreferrer" target="_blank">' + \
donateUrl + '</a>'
for propertyValue in actorJson['attachment']:
if not propertyValue.get('name'):