From feb98cf9f9d48a29c0b9957561ef01179fcd44ef Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 21 Oct 2018 19:02:08 +0300 Subject: Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgrade --- blessings/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/blessings/__init__.py b/blessings/__init__.py index d9305e6..878720a 100644 --- a/blessings/__init__.py +++ b/blessings/__init__.py @@ -418,14 +418,14 @@ def derivative_colors(colors): [('on_bright_' + c) for c in colors]) -COLORS = set(['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', - 'white']) +COLORS = {'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', + 'white'} COLORS.update(derivative_colors(COLORS)) -SINGLES = set(['bold', 'reverse', 'blink', 'dim', 'flash']) -DUALS = set([ +SINGLES = {'bold', 'reverse', 'blink', 'dim', 'flash'} +DUALS = { 'underline', 'italic', 'shadow', 'standout', 'subscript', 'superscript' -]) -COMPOUNDABLES = (COLORS | SINGLES | DUALS | set(['no_' + c for c in DUALS])) +} +COMPOUNDABLES = (COLORS | SINGLES | DUALS | {'no_' + c for c in DUALS}) class ParametrizingString(text_type): -- cgit v1.2.1