dataclass-ify IRCBuffer.BufferLine, add .notes={}
This commit is contained in:
parent
9972125b24
commit
710b711c70
1 changed files with 9 additions and 9 deletions
|
@ -1,17 +1,17 @@
|
||||||
import collections, re, typing
|
import collections, dataclasses, re, typing
|
||||||
from src import IRCBot, IRCServer, utils
|
from src import IRCBot, IRCServer, utils
|
||||||
|
|
||||||
MAX_LINES = 64
|
MAX_LINES = 64
|
||||||
|
|
||||||
|
@dataclasses.dataclass
|
||||||
class BufferLine(object):
|
class BufferLine(object):
|
||||||
def __init__(self, sender: str, message: str, action: bool, tags: dict,
|
sender: str
|
||||||
from_self: bool, method: str):
|
message: str
|
||||||
self.sender = sender
|
action: bool
|
||||||
self.message = message
|
tags: dict
|
||||||
self.action = action
|
from_self: bool
|
||||||
self.tags = tags
|
method: str
|
||||||
self.from_self = from_self
|
notes: typing.Dict[str, str] = {}
|
||||||
self.method = method
|
|
||||||
|
|
||||||
class BufferLineMatch(object):
|
class BufferLineMatch(object):
|
||||||
def __init__(self, line: BufferLine, match: str):
|
def __init__(self, line: BufferLine, match: str):
|
||||||
|
|
Loading…
Add table
Reference in a new issue