From 91414835277b2814d1a1c02714c51c21c1491466 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Mon, 23 Jan 2023 06:48:05 +0100 Subject: [PATCH] Use dict literals --- scour/scour.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scour/scour.py b/scour/scour.py index 5580fc5..9449f3c 100644 --- a/scour/scour.py +++ b/scour/scour.py @@ -2095,7 +2095,7 @@ def taint(taintedSet, taintedAttribute): Related attributes are also included.""" taintedSet.add(taintedAttribute) 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']: taintedSet.add('marker') return taintedSet @@ -4072,7 +4072,7 @@ def generateDefaultOptions(): # sanitizes options by updating attributes in a set of defaults options while discarding unknown attributes 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._update_careful(optionsDict)