~nhanb/mcross

bd7d6dec5c9bd8c9f1f08ac64f33c0eff34f8163 — Bùi Thành Nhân 10 months ago b26c4f1 0.5.19
satisfy black + isort
M pyproject.toml => pyproject.toml +4 -0
@@ 28,3 28,7 @@ ipdb = "^0.13.2"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

[tool.isort]
multi_line_output = 3
include_trailing_comma = true

M src/mcross/__init__.py => src/mcross/__init__.py +2 -1
@@ 10,9 10,10 @@ def run():


def info():
    from . import conf
    from pprint import pprint

    from . import conf

    conf.init()

    print("Config file:", conf.CONFIG_FILE)

M src/mcross/conf.py => src/mcross/conf.py +3 -1
@@ 60,7 60,9 @@ def parse_conf_args():
    argparser = argparse.ArgumentParser()
    for confdef in conf_definitions:
        argparser.add_argument(
            f"-{confdef.short_name}", f"--{confdef.name}", type=confdef.type,
            f"-{confdef.short_name}",
            f"--{confdef.name}",
            type=confdef.type,
        )
    args = argparser.parse_args()
    return {key.replace("_", "-"): val for key, val in vars(args).items() if val}

M src/mcross/gui/controller.py => src/mcross/gui/controller.py +7 -3
@@ 7,9 7,13 @@ from tkinter import READABLE, Tk, messagebox

import curio

from ..transport import (MAX_REQUEST_SECONDS, GeminiUrl,
                         NonAbsoluteUrlWithoutContextError,
                         UnsupportedProtocolError, get)
from ..transport import (
    MAX_REQUEST_SECONDS,
    GeminiUrl,
    NonAbsoluteUrlWithoutContextError,
    UnsupportedProtocolError,
    get,
)
from .model import Model
from .view import WAITING_CURSOR, View


M src/mcross/gui/view.py => src/mcross/gui/view.py +10 -2
@@ 3,8 3,16 @@ import sys
from tkinter import Text, Tk, font, ttk

from .. import conf
from ..document import (GeminiNode, H1Node, H2Node, H3Node, LinkNode,
                        ListItemNode, PreformattedNode, TextNode)
from ..document import (
    GeminiNode,
    H1Node,
    H2Node,
    H3Node,
    LinkNode,
    ListItemNode,
    PreformattedNode,
    TextNode,
)
from .model import Model
from .widgets import AltButton, McEntry, ReadOnlyText


M src/mcross/gui/widgets.py => src/mcross/gui/widgets.py +2 -1
@@ 1,6 1,7 @@
from idlelib.redirector import WidgetRedirector
from tkinter import Text, ttk

from idlelib.redirector import WidgetRedirector


# Can't just use a Text widget with state='disabled' because that would
# also disable Ctrl+C / Ctrl+V.