Increase spacing in modules
This commit is contained in:
parent
7da4bf36d5
commit
7e2c802364
12 changed files with 21 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
__all__ = ["AttributedLines"]
|
__all__ = ["AttributedLines"]
|
||||||
|
|
||||||
|
|
||||||
class AttributedLines:
|
class AttributedLines:
|
||||||
"""
|
"""
|
||||||
AttributedLines is a list of lines of AttributedText that maintains a
|
AttributedLines is a list of lines of AttributedText that maintains a
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
__all__ = ["AttributedLinesWidget", "ALWidget"]
|
__all__ = ["AttributedLinesWidget", "ALWidget"]
|
||||||
|
|
||||||
|
|
||||||
class AttributedLinesWidget:
|
class AttributedLinesWidget:
|
||||||
"""
|
"""
|
||||||
This widget draws lines of AttributedText with a horizontal and a vertical
|
This widget draws lines of AttributedText with a horizontal and a vertical
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@ from typing import Any, List, Tuple, Union
|
||||||
|
|
||||||
import urwid
|
import urwid
|
||||||
|
|
||||||
from ..markup import AttributedText
|
from .markup import AttributedText
|
||||||
|
|
||||||
__all__ = ["AttributedTextWidget", "ATWidget"]
|
__all__ = ["AttributedTextWidget", "ATWidget"]
|
||||||
|
|
||||||
|
|
||||||
class AttributedTextWidget(urwid.Text):
|
class AttributedTextWidget(urwid.Text):
|
||||||
"""
|
"""
|
||||||
A widget that works like urwid.Text, but displays AttributedText.
|
A widget that works like urwid.Text, but displays AttributedText.
|
||||||
|
|
@ -51,7 +52,7 @@ class AttributedTextWidget(urwid.Text):
|
||||||
self._attributed_text = text
|
self._attributed_text = text
|
||||||
super().set_text(self._convert_to_markup(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
|
This function should not be used directly. Instead, use
|
||||||
set_attributed_text().
|
set_attributed_text().
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,14 @@ from typing import Any, Dict
|
||||||
|
|
||||||
__all__ = ["Fields", "Config", "ConfigView"]
|
__all__ = ["Fields", "Config", "ConfigView"]
|
||||||
|
|
||||||
|
|
||||||
Fields = Dict[str, Any]
|
Fields = Dict[str, Any]
|
||||||
|
|
||||||
|
|
||||||
class ConfigException(Exception):
|
class ConfigException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_tree(tree: Any, prefix: str = "") -> Fields:
|
def from_tree(tree: Any, prefix: str = "") -> Fields:
|
||||||
|
|
@ -109,6 +112,7 @@ class Config:
|
||||||
both.update(self.fields)
|
both.update(self.fields)
|
||||||
return self.to_tree(both)
|
return self.to_tree(both)
|
||||||
|
|
||||||
|
|
||||||
class ConfigView:
|
class ConfigView:
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
fields: Any,
|
fields: Any,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
__all__ = ["ElementException", "TreeException"]
|
__all__ = ["ElementException", "TreeException"]
|
||||||
|
|
||||||
|
|
||||||
class ElementException(Exception):
|
class ElementException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class TreeException(Exception):
|
class TreeException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
|
||||||
|
|
||||||
__all__ = ["Attributes", "Chunk", "AttributedText", "AT"]
|
__all__ = ["Attributes", "Chunk", "AttributedText", "AT"]
|
||||||
|
|
||||||
|
|
||||||
Attributes = Dict[str, Any]
|
Attributes = Dict[str, Any]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
__all__ = ["Message", "RenderedMessage"]
|
__all__ = ["Message", "RenderedMessage"]
|
||||||
|
|
||||||
|
|
||||||
class Message:
|
class Message:
|
||||||
"""
|
"""
|
||||||
A Message represents a single euphoria message. It contains the information
|
A Message represents a single euphoria message. It contains the information
|
||||||
|
|
@ -15,6 +16,7 @@ class Message:
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class RenderedMessage:
|
class RenderedMessage:
|
||||||
"""
|
"""
|
||||||
A RenderedMessage is the result of rendering a Message. It contains lines
|
A RenderedMessage is the result of rendering a Message. It contains lines
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
__all__ = ["RenderedMessageCache"]
|
__all__ = ["RenderedMessageCache"]
|
||||||
|
|
||||||
|
|
||||||
class RenderedMessageCache:
|
class RenderedMessageCache:
|
||||||
"""
|
"""
|
||||||
This is a cache for RenderedMessage-s. Message-s should not need to be
|
This is a cache for RenderedMessage-s. Message-s should not need to be
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
__all__ = ["MessageEditorWidget"]
|
__all__ = ["MessageEditorWidget"]
|
||||||
|
|
||||||
|
|
||||||
class MessageEditorWidget:
|
class MessageEditorWidget:
|
||||||
"""
|
"""
|
||||||
This widget allows the user to compose a new message. It is based on
|
This widget allows the user to compose a new message. It is based on
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
__all__ = ["MessageSupply"]
|
__all__ = ["MessageSupply"]
|
||||||
|
|
||||||
|
|
||||||
class MessageSupply:
|
class MessageSupply:
|
||||||
"""
|
"""
|
||||||
A MessageSupply holds all of a room's known messages. It can be queried in
|
A MessageSupply holds all of a room's known messages. It can be queried in
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
__all__ = ["MessageTreeWidget"]
|
__all__ = ["MessageTreeWidget"]
|
||||||
|
|
||||||
|
|
||||||
class MessageTreeWidget:
|
class MessageTreeWidget:
|
||||||
"""
|
"""
|
||||||
This widget displays an ElementSupply, including user interface like a
|
This widget displays an ElementSupply, including user interface like a
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
__all__ = ["UserListWidget"]
|
__all__ = ["UserListWidget"]
|
||||||
|
|
||||||
|
|
||||||
class UserListWidget:
|
class UserListWidget:
|
||||||
"""
|
"""
|
||||||
This widget displays the users currently connected to a Room.
|
This widget displays the users currently connected to a Room.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue