Remove whitespace after parenthesis

This commit is contained in:
Brandon Myers 2018-10-05 17:34:36 -04:00
Родитель 18781fe276
Коммит 06f0e78c5a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 8AA79AD83045BBC7
15 изменённых файлов: 18 добавлений и 19 удалений

Просмотреть файл

@ -17,7 +17,6 @@ ignore =
E128 # continuation line under-indented for visual indent
E129 # visually indented line with same indent as next logical line
E131 # continuation line unaligned for hanging indent
E201 # whitespace after '('
E202 # whitespace before ')'
E203 # whitespace before '
E211 # whitespace before '('

Просмотреть файл

@ -40,4 +40,4 @@ class TraceAudit(AlertTask):
for i in hostnames[:5]:
summary += ' on {0} ({1} hosts)'.format(i[0], i[1])
return self.createAlertDict(summary, category, tags, aggreg['events'], severity)
return self.createAlertDict(summary, category, tags, aggreg['events'], severity)

Просмотреть файл

@ -41,4 +41,4 @@ class WriteAudit(AlertTask):
for i in hostnames[:5]:
summary += ' on {0} ({1} hosts)'.format(i[0], i[1])
return self.createAlertDict(summary, category, tags, aggreg['events'], severity)
return self.createAlertDict(summary, category, tags, aggreg['events'], severity)

Просмотреть файл

@ -161,7 +161,7 @@ def s3_upload_file(file_path, bucket_name, key_name):
key.set_acl('public-read')
url = "https://s3.amazonaws.com/{}/{}".format(bucket.name, key.name)
print( "URL: {}".format(url))
print("URL: {}".format(url))
return url
if __name__ == '__main__':
@ -174,4 +174,4 @@ if __name__ == '__main__':
(options, args) = parser.parse_args()
initConfig()
initLogger()
main()
main()

Просмотреть файл

@ -231,7 +231,7 @@ def s3_upload_file(file_path, bucket_name, key_name):
key.set_acl('public-read')
url = "https://s3.amazonaws.com/{}/{}".format(bucket.name, key.name)
print( "URL: {}".format(url))
print("URL: {}".format(url))
return url
if __name__ == '__main__':
@ -244,4 +244,4 @@ if __name__ == '__main__':
(options, args) = parser.parse_args()
initConfig()
initLogger()
main()
main()

Просмотреть файл

@ -135,7 +135,7 @@ def main():
for row in rows:
id = row['UniqueCallID']
# Copy the row's info if we don't already have the final completed call state
if id not in calls or ( id in calls and calls[id]['CallState'] != 'COMPLETED' ):
if id not in calls or (id in calls and calls[id]['CallState'] != 'COMPLETED' ):
calls[id] = row
# Massage call data and send to MozDef

Просмотреть файл

@ -40,4 +40,4 @@ class DotDict(dict):
key, node = key.split('.', 1)
return self.__lookup(dct[key], node)
else:
return dct[key]
return dct[key]

Просмотреть файл

@ -87,7 +87,7 @@ class message(object):
# handle the case of an escaped list:
# "remoteAddressChain": "[\"1.2.3.4\",\"5.6.7.8\",\"127.0.0.1\"]"
if ( isinstance(message['details']['remoteAddressChain'], unicode) and
if (isinstance(message['details']['remoteAddressChain'], unicode) and
message['details']['remoteAddressChain'][0]=='[' and
message['details']['remoteAddressChain'][-1]==']' ):
# remove the brackets and double quotes

Просмотреть файл

@ -20,7 +20,7 @@ class message(object):
# and do any clean up
# check for details.kind like 'admin#reports#activity'
if ( 'details' in message.keys() and
if ('details' in message.keys() and
'kind' in message['details'].keys() and
'activity' in message['details']['kind']):

Просмотреть файл

@ -343,7 +343,7 @@ def createIncident():
incident['dateMitigated'] = validateDate(body.get('dateMitigated'))
incident['dateContained'] = validateDate(body.get('dateContained'))
dates = [ incident['dateOpened'],
dates = [incident['dateOpened'],
incident['dateClosed'],
incident['dateReported'],
incident['dateVerified'],
@ -594,7 +594,7 @@ def verisSummary(verisRegex=None):
{"$match":{"tags":{"$exists":True}}},
{"$unwind" : "$tags" },
{"$match":{"tags":{"$regex":''}}}, #regex for tag querying
{ "$project" : { "dateOpened" : 1 ,
{"$project" : {"dateOpened" : 1 ,
"tags" : 1 ,
"phase": 1,
"_id": 0

Просмотреть файл

@ -250,4 +250,4 @@ class message(object):
sys.stderr.write('Error handling request.json %r \n'% (e))
response.status = "500"
return (request, response)
return (request, response)

Просмотреть файл

@ -134,7 +134,7 @@ class message(object):
ipblocklist = mongoclient.meteor['ipblocklist']
# good data?
if ( isIPv6(ipaddress) or isIPv4(ipaddress) ) and ( ipaddress not in netaddr.IPSet(['0.0.0.0']) ):
if (isIPv6(ipaddress) or isIPv4(ipaddress) ) and (ipaddress not in netaddr.IPSet(['0.0.0.0']) ):
ipcidr = netaddr.IPNetwork(ipaddress)
# already in the table?
@ -265,4 +265,4 @@ class message(object):
except Exception as e:
sys.stderr.write('Error handling request.json %r \n'% (e))
return (request, response)
return (request, response)

Просмотреть файл

@ -75,7 +75,7 @@ class message(object):
if cur_section is not None:
cur_options = myparser.options(cur_section)
if cur_options is not None:
self.multioptions.append({ 'region': myparser.get(cur_section, 'region'), 'aws_access_key_id': myparser.get(cur_section, 'aws_access_key_id'), 'aws_secret_access_key': myparser.get(cur_section, 'aws_secret_access_key') } )
self.multioptions.append({'region': myparser.get(cur_section, 'region'), 'aws_access_key_id': myparser.get(cur_section, 'aws_access_key_id'), 'aws_secret_access_key': myparser.get(cur_section, 'aws_secret_access_key') } )
def addBlackholeEntry(self,
ipaddress=None):

Просмотреть файл

@ -100,4 +100,4 @@ class TestTraceAudit(AlertTestSuite):
description="Negative test case with old timestamp",
events=events,
)
)
)

Просмотреть файл

@ -122,4 +122,4 @@ class TestWriteAudit(AlertTestSuite):
description="Negative test case with old timestamp",
events=events,
)
)
)