Fixed series of PEP8 E502 errors surfacing in Python 3.11 flake8 checks (#1149)

This commit is contained in:
Chris Caron 2024-07-01 22:13:46 -04:00 committed by GitHub
parent 35ed4d266e
commit 6733953cc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 12 additions and 12 deletions

View File

@ -121,7 +121,7 @@ if platform.system() == 'Windows':
# Global Support # Global Support
# #
# C:\ProgramData\Apprise\ # C:\ProgramData\Apprise
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise'), expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise'),
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.conf'), expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.conf'),
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.yml'), expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.yml'),

View File

@ -269,7 +269,7 @@ class NotifyBulkSMS(NotifyBase):
'to': None, 'to': None,
'body': body, 'body': body,
'routingGroup': self.route, 'routingGroup': self.route,
'encoding': BulkSMSEncoding.UNICODE \ 'encoding': BulkSMSEncoding.UNICODE
if self.unicode else BulkSMSEncoding.TEXT, if self.unicode else BulkSMSEncoding.TEXT,
# Options are NONE, ALL and ERRORS # Options are NONE, ALL and ERRORS
'deliveryReports': "ERRORS" 'deliveryReports': "ERRORS"

View File

@ -938,7 +938,7 @@ class NotifyLametric(NotifyBase):
LAMETRIC_IS_APP_TOKEN.match(results['password'])) and LAMETRIC_IS_APP_TOKEN.match(results['password'])) and
# Scan for app_ flags # Scan for app_ flags
next((f for f in results.keys() \ next((f for f in results.keys()
if f.startswith('app_')), None) is None) \ if f.startswith('app_')), None) is None) \
else LametricMode.CLOUD else LametricMode.CLOUD

View File

@ -66,10 +66,10 @@ apprise_url_tests = (
('mmost://localhost/3ccdd113474722377935511fc85d3dd4' ('mmost://localhost/3ccdd113474722377935511fc85d3dd4'
'?to=test&image=True', { '?to=test&image=True', {
'instance': NotifyMattermost}), 'instance': NotifyMattermost}),
('mmost://localhost/3ccdd113474722377935511fc85d3dd4' \ ('mmost://localhost/3ccdd113474722377935511fc85d3dd4'
'?to=test&image=False', { '?to=test&image=False', {
'instance': NotifyMattermost}), 'instance': NotifyMattermost}),
('mmost://localhost/3ccdd113474722377935511fc85d3dd4' \ ('mmost://localhost/3ccdd113474722377935511fc85d3dd4'
'?to=test&image=True', { '?to=test&image=True', {
'instance': NotifyMattermost, 'instance': NotifyMattermost,
# don't include an image by default # don't include an image by default

View File

@ -96,7 +96,7 @@ apprise_url_tests = (
}, },
# Our expected url(privacy=True) startswith() response: # Our expected url(privacy=True) startswith() response:
'privacy_url': 'o365://t...t:user@example.com/a...h/' \ 'privacy_url': 'o365://t...t:user@example.com/a...h/'
'****/email1%40test.ca/'}), '****/email1%40test.ca/'}),
# test our arguments # test our arguments
('o365://_/?oauth_id={cid}&oauth_secret={secret}&tenant={tenant}' ('o365://_/?oauth_id={cid}&oauth_secret={secret}&tenant={tenant}'
@ -117,7 +117,7 @@ apprise_url_tests = (
}, },
# Our expected url(privacy=True) startswith() response: # Our expected url(privacy=True) startswith() response:
'privacy_url': 'o365://t...t:user@example.com/a...h/' \ 'privacy_url': 'o365://t...t:user@example.com/a...h/'
'****/email1%40test.ca/'}), '****/email1%40test.ca/'}),
# Test invalid JSON (no tenant defaults to email domain) # Test invalid JSON (no tenant defaults to email domain)
('o365://{tenant}:{aid}/{cid}/{secret}/{targets}'.format( ('o365://{tenant}:{aid}/{cid}/{secret}/{targets}'.format(

View File

@ -376,7 +376,7 @@ def test_plugin_sns_aws_topic_handling(mock_post):
# Multi-Topic # Multi-Topic
'sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnl/us-east-1/TopicA/TopicB/' 'sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnl/us-east-1/TopicA/TopicB/'
# Topic-Mix # Topic-Mix
'sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkce/us-west-2/' \ 'sns://T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkce/us-west-2/'
'12223334444/TopicA']) '12223334444/TopicA'])
# CreateTopic fails # CreateTopic fails

View File

@ -66,13 +66,13 @@ apprise_url_tests = (
'instance': NotifySplunk, 'instance': NotifySplunk,
}), }),
# Support legacy URL # Support legacy URL
('https://alert.victorops.com/integrations/generic/20131114/' \ ('https://alert.victorops.com/integrations/generic/20131114/'
'alert/apikey/routing_key', { 'alert/apikey/routing_key', {
# We're good # We're good
'instance': NotifySplunk, 'instance': NotifySplunk,
}), }),
# Support legacy URL (with entity id provided) # Support legacy URL (with entity id provided)
('https://alert.victorops.com/integrations/generic/20131114/' \ ('https://alert.victorops.com/integrations/generic/20131114/'
'alert/apikey/routing_key/entity_id', { 'alert/apikey/routing_key/entity_id', {
# We're good # We're good
'instance': NotifySplunk, 'instance': NotifySplunk,

View File

@ -116,7 +116,7 @@ def test_plugin_threema():
AppriseURLTester(tests=apprise_url_tests).run_all() AppriseURLTester(tests=apprise_url_tests).run_all()
@ mock.patch('requests.post') @mock.patch('requests.post')
def test_plugin_threema_edge_cases(mock_post): def test_plugin_threema_edge_cases(mock_post):
""" """
NotifyThreema() Edge Cases NotifyThreema() Edge Cases

View File

@ -170,7 +170,7 @@ def test_plugin_voipms():
AppriseURLTester(tests=apprise_url_tests).run_all() AppriseURLTester(tests=apprise_url_tests).run_all()
@ mock.patch('requests.get') @mock.patch('requests.get')
def test_plugin_voipms_edge_cases(mock_get): def test_plugin_voipms_edge_cases(mock_get):
""" """
NotifyVoipms() Edge Cases NotifyVoipms() Edge Cases