From c52a04c7d36d55843cdc6a1c21208c66f6e85af2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Jun 2021 05:36:05 +0530 Subject: [PATCH] Use a tuple for clipboard control Avoids churn in the generated options files as python randomized set ordering --- kitty/options/types.py | 2 +- kitty/options/utils.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kitty/options/types.py b/kitty/options/types.py index 559a3bb7a..2bbe94e96 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -451,7 +451,7 @@ class Options: box_drawing_scale: typing.Tuple[float, float, float, float] = (0.001, 1.0, 1.5, 2.0) clear_all_shortcuts: bool = False click_interval: float = -1.0 - clipboard_control: typing.FrozenSet[str] = frozenset({'write-clipboard', 'write-primary'}) + clipboard_control: typing.Tuple[str, ...] = ('write-clipboard', 'write-primary') close_on_child_death: bool = False @property diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 08212b66b..de9c75a2b 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -7,8 +7,7 @@ import re import sys from typing import ( - Any, Callable, Dict, FrozenSet, Iterable, List, Optional, Sequence, Tuple, - Union + Any, Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Union ) import kitty.fast_data_types as defines @@ -630,8 +629,8 @@ def allow_remote_control(x: str) -> str: return x -def clipboard_control(x: str) -> FrozenSet[str]: - return frozenset(x.lower().split()) +def clipboard_control(x: str) -> Tuple[str, ...]: + return tuple(x.lower().split()) def allow_hyperlinks(x: str) -> int: