From 7e2c8023643b1d08f76ac9d71c1fb5ceb3885b06 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 25 May 2019 13:22:23 +0000 Subject: [PATCH] Increase spacing in modules --- cheuph/attributed_lines.py | 1 + cheuph/attributed_lines_widget.py | 1 + cheuph/attributed_text_widget.py | 5 +++-- cheuph/config.py | 4 ++++ cheuph/exceptions.py | 2 ++ cheuph/markup.py | 1 + cheuph/message.py | 2 ++ cheuph/message_cache.py | 4 +++- cheuph/message_editor_widget.py | 1 + cheuph/message_supply.py | 1 + cheuph/message_tree_widget.py | 1 + cheuph/user_list_widget.py | 1 + 12 files changed, 21 insertions(+), 3 deletions(-) diff --git a/cheuph/attributed_lines.py b/cheuph/attributed_lines.py index 950eb6f..16697ed 100644 --- a/cheuph/attributed_lines.py +++ b/cheuph/attributed_lines.py @@ -1,5 +1,6 @@ __all__ = ["AttributedLines"] + class AttributedLines: """ AttributedLines is a list of lines of AttributedText that maintains a diff --git a/cheuph/attributed_lines_widget.py b/cheuph/attributed_lines_widget.py index 9335d68..aec81d9 100644 --- a/cheuph/attributed_lines_widget.py +++ b/cheuph/attributed_lines_widget.py @@ -1,5 +1,6 @@ __all__ = ["AttributedLinesWidget", "ALWidget"] + class AttributedLinesWidget: """ This widget draws lines of AttributedText with a horizontal and a vertical diff --git a/cheuph/attributed_text_widget.py b/cheuph/attributed_text_widget.py index 80e0fbf..f4377ae 100644 --- a/cheuph/attributed_text_widget.py +++ b/cheuph/attributed_text_widget.py @@ -2,10 +2,11 @@ from typing import Any, List, Tuple, Union import urwid -from ..markup import AttributedText +from .markup import AttributedText __all__ = ["AttributedTextWidget", "ATWidget"] + class AttributedTextWidget(urwid.Text): """ A widget that works like urwid.Text, but displays AttributedText. @@ -51,7 +52,7 @@ class AttributedTextWidget(urwid.Text): self._attributed_text = text super().set_text(self._convert_to_markup(text)) - def set_text(self, *args, **kwargs): + def set_text(self, *args: Any, **kwargs: Any) -> None: """ This function should not be used directly. Instead, use set_attributed_text(). diff --git a/cheuph/config.py b/cheuph/config.py index 9b5946e..21f9aaf 100644 --- a/cheuph/config.py +++ b/cheuph/config.py @@ -10,11 +10,14 @@ from typing import Any, Dict __all__ = ["Fields", "Config", "ConfigView"] + Fields = Dict[str, Any] + class ConfigException(Exception): pass + class Config: @staticmethod def from_tree(tree: Any, prefix: str = "") -> Fields: @@ -109,6 +112,7 @@ class Config: both.update(self.fields) return self.to_tree(both) + class ConfigView: def __init__(self, fields: Any, diff --git a/cheuph/exceptions.py b/cheuph/exceptions.py index 76c4edc..7bef822 100644 --- a/cheuph/exceptions.py +++ b/cheuph/exceptions.py @@ -1,7 +1,9 @@ __all__ = ["ElementException", "TreeException"] + class ElementException(Exception): pass + class TreeException(Exception): pass diff --git a/cheuph/markup.py b/cheuph/markup.py index 9e86a96..0fdb499 100644 --- a/cheuph/markup.py +++ b/cheuph/markup.py @@ -2,6 +2,7 @@ from typing import Any, Dict, Iterable, List, Optional, Tuple, Union __all__ = ["Attributes", "Chunk", "AttributedText", "AT"] + Attributes = Dict[str, Any] diff --git a/cheuph/message.py b/cheuph/message.py index 6a576d0..9e407a4 100644 --- a/cheuph/message.py +++ b/cheuph/message.py @@ -1,5 +1,6 @@ __all__ = ["Message", "RenderedMessage"] + class Message: """ A Message represents a single euphoria message. It contains the information @@ -15,6 +16,7 @@ class Message: pass + class RenderedMessage: """ A RenderedMessage is the result of rendering a Message. It contains lines diff --git a/cheuph/message_cache.py b/cheuph/message_cache.py index bf68a55..a083696 100644 --- a/cheuph/message_cache.py +++ b/cheuph/message_cache.py @@ -1,4 +1,6 @@ -__all__ = ["RenderedMessageCache"] +__all__ = ["RenderedMessageCache"] + + class RenderedMessageCache: """ This is a cache for RenderedMessage-s. Message-s should not need to be diff --git a/cheuph/message_editor_widget.py b/cheuph/message_editor_widget.py index 72cffb2..e050a4f 100644 --- a/cheuph/message_editor_widget.py +++ b/cheuph/message_editor_widget.py @@ -1,5 +1,6 @@ __all__ = ["MessageEditorWidget"] + class MessageEditorWidget: """ This widget allows the user to compose a new message. It is based on diff --git a/cheuph/message_supply.py b/cheuph/message_supply.py index 6298704..1e674c7 100644 --- a/cheuph/message_supply.py +++ b/cheuph/message_supply.py @@ -1,5 +1,6 @@ __all__ = ["MessageSupply"] + class MessageSupply: """ A MessageSupply holds all of a room's known messages. It can be queried in diff --git a/cheuph/message_tree_widget.py b/cheuph/message_tree_widget.py index 1f530db..547e31f 100644 --- a/cheuph/message_tree_widget.py +++ b/cheuph/message_tree_widget.py @@ -1,5 +1,6 @@ __all__ = ["MessageTreeWidget"] + class MessageTreeWidget: """ This widget displays an ElementSupply, including user interface like a diff --git a/cheuph/user_list_widget.py b/cheuph/user_list_widget.py index 28b908e..797958a 100644 --- a/cheuph/user_list_widget.py +++ b/cheuph/user_list_widget.py @@ -1,5 +1,6 @@ __all__ = ["UserListWidget"] + class UserListWidget: """ This widget displays the users currently connected to a Room.