Move definition of IRCArgs above IRCLine
This commit is contained in:
parent
e1d261bda0
commit
52aa8a51a6
1 changed files with 8 additions and 8 deletions
|
@ -52,14 +52,6 @@ def seperate_hostmask(hostmask: str) -> IRCHostmask:
|
|||
username, _, hostname = username.partition("@")
|
||||
return IRCHostmask(nickname, username, hostname, hostmask)
|
||||
|
||||
class IRCLine(object):
|
||||
def __init__(self, tags: dict, prefix: typing.Optional[str], command: str,
|
||||
args: IRCArgs):
|
||||
self.tags = tags
|
||||
self.prefix = prefix
|
||||
self.command = command
|
||||
self.args = args
|
||||
|
||||
class IRCArgs(object):
|
||||
def __init__(self, args: typing.List[str]):
|
||||
self._args = args
|
||||
|
@ -70,6 +62,14 @@ class IRCArgs(object):
|
|||
return self._args[index]
|
||||
return None
|
||||
|
||||
class IRCLine(object):
|
||||
def __init__(self, tags: dict, prefix: typing.Optional[str], command: str,
|
||||
args: IRCArgs):
|
||||
self.tags = tags
|
||||
self.prefix = prefix
|
||||
self.command = command
|
||||
self.args = args
|
||||
|
||||
def parse_line(line: str) -> IRCLine:
|
||||
tags = {}
|
||||
prefix = typing.Optional[IRCHostmask]
|
||||
|
|
Loading…
Reference in a new issue