Use dict literals
This commit is contained in:
parent
c3b305cc5d
commit
9141483527
1 changed files with 2 additions and 2 deletions
|
|
@ -2095,7 +2095,7 @@ def taint(taintedSet, taintedAttribute):
|
||||||
Related attributes are also included."""
|
Related attributes are also included."""
|
||||||
taintedSet.add(taintedAttribute)
|
taintedSet.add(taintedAttribute)
|
||||||
if taintedAttribute == 'marker':
|
if taintedAttribute == 'marker':
|
||||||
taintedSet |= set(['marker-start', 'marker-mid', 'marker-end'])
|
taintedSet |= {'marker-start', 'marker-mid', 'marker-end'}
|
||||||
if taintedAttribute in ['marker-start', 'marker-mid', 'marker-end']:
|
if taintedAttribute in ['marker-start', 'marker-mid', 'marker-end']:
|
||||||
taintedSet.add('marker')
|
taintedSet.add('marker')
|
||||||
return taintedSet
|
return taintedSet
|
||||||
|
|
@ -4072,7 +4072,7 @@ def generateDefaultOptions():
|
||||||
|
|
||||||
# sanitizes options by updating attributes in a set of defaults options while discarding unknown attributes
|
# sanitizes options by updating attributes in a set of defaults options while discarding unknown attributes
|
||||||
def sanitizeOptions(options=None):
|
def sanitizeOptions(options=None):
|
||||||
optionsDict = dict((key, getattr(options, key)) for key in dir(options) if not key.startswith('__'))
|
optionsDict = {key: getattr(options, key) for key in dir(options) if not key.startswith('__')}
|
||||||
|
|
||||||
sanitizedOptions = _options_parser.get_default_values()
|
sanitizedOptions = _options_parser.get_default_values()
|
||||||
sanitizedOptions._update_careful(optionsDict)
|
sanitizedOptions._update_careful(optionsDict)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue