From 8e38637250e6de403ff809643e47314e0b586417 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 12 Jun 2020 17:07:55 +0200 Subject: [PATCH] No ned to explicitly declare sets --- nw/core/index.py | 4 ++-- nw/core/options.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/nw/core/index.py b/nw/core/index.py index 456b415c..632375a7 100644 --- a/nw/core/index.py +++ b/nw/core/index.py @@ -41,7 +41,7 @@ logger = logging.getLogger(__name__) class NWIndex(): - VALID_KEYS = set([ + VALID_KEYS = { nwKeyWords.TAG_KEY, nwKeyWords.PLOT_KEY, nwKeyWords.POV_KEY, @@ -51,7 +51,7 @@ class NWIndex(): nwKeyWords.OBJECT_KEY, nwKeyWords.ENTITY_KEY, nwKeyWords.CUSTOM_KEY - ]) + } TAG_CLASS = { nwKeyWords.CHAR_KEY : nwItemClass.CHARACTER, nwKeyWords.POV_KEY : nwItemClass.CHARACTER, diff --git a/nw/core/options.py b/nw/core/options.py index abab6a65..25bf1fb4 100644 --- a/nw/core/options.py +++ b/nw/core/options.py @@ -45,7 +45,7 @@ class OptionState(): self.theState = {} self.validMap = { - "GuiSession": set([ + "GuiSession": { "widthCol0", "widthCol1", "widthCol2", @@ -53,11 +53,11 @@ class OptionState(): "sortOrder", "hideZeros", "hideNegative", - ]), - "GuiDocSplit": set([ + }, + "GuiDocSplit": { "spLevel", - ]), - "GuiBuildNovel": set([ + }, + "GuiBuildNovel": { "winWidth", "winHeight", "addNovel", @@ -72,12 +72,12 @@ class OptionState(): "incComments", "incKeywords", "incBodyText", - ]), - "GuiOutline": set([ + }, + "GuiOutline": { "headerOrder", "columnWidth", "columnHidden", - ]), + }, } return