~tardypad/wee-most

1b3230262890c2fdbc8475d60f690d52da0193cf — Damien Tardy-Panis 3 months ago 4308284
Use namedtuple instead of typed NamedTuple for Setting

No reason to only have this structure being typed
1 files changed, 2 insertions(+), 9 deletions(-)

M wee_most/config.py
M wee_most/config.py => wee_most/config.py +2 -9
@@ 1,21 1,14 @@

import weechat
import os
from typing import NamedTuple
from collections import namedtuple

download_dir = os.environ.get('XDG_DOWNLOAD_DIR')
if not download_dir:
    download_dir = '~/Downloads'

class PluginConfig:
    Setting = NamedTuple(
            "Setting",
            [
                ("key", str),
                ("default", str),
                ("desc", str),
            ]
    )
    Setting = namedtuple("Setting", ["key", "default", "desc"])

    general_settings = [
        Setting(