Move MessagePart to message.py
This commit is contained in:
parent
f7f4569594
commit
1bb3c21122
2 changed files with 6 additions and 6 deletions
|
@ -45,6 +45,11 @@ def parse_timestamp(timestamp: str):
|
||||||
|
|
||||||
return parsedate_to_datetime(timestamp)
|
return parsedate_to_datetime(timestamp)
|
||||||
|
|
||||||
|
class MessagePart(enum.Enum):
|
||||||
|
HEAD = 1
|
||||||
|
BODY = enum.auto()
|
||||||
|
WHOLE = enum.auto()
|
||||||
|
|
||||||
class MessageRange():
|
class MessageRange():
|
||||||
__slots__ = 'id', 'min', 'max',
|
__slots__ = 'id', 'min', 'max',
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from nntp.tiny.buffer import LineBuffer, OutputBuffer, BufferOverflow
|
||||||
from nntp.tiny.db import Database
|
from nntp.tiny.db import Database
|
||||||
from nntp.tiny.response import Response, ResponseCode
|
from nntp.tiny.response import Response, ResponseCode
|
||||||
from nntp.tiny.newsgroup import Newsgroup
|
from nntp.tiny.newsgroup import Newsgroup
|
||||||
from nntp.tiny.message import Message, MessageRange
|
from nntp.tiny.message import Message, MessageRange, MessagePart
|
||||||
|
|
||||||
class SessionState(enum.Flag):
|
class SessionState(enum.Flag):
|
||||||
ACTIVE = 1
|
ACTIVE = 1
|
||||||
|
@ -23,11 +23,6 @@ class SessionState(enum.Flag):
|
||||||
class SessionMode(enum.Enum):
|
class SessionMode(enum.Enum):
|
||||||
READER = 1
|
READER = 1
|
||||||
|
|
||||||
class MessagePart(enum.Enum):
|
|
||||||
HEAD = 1
|
|
||||||
BODY = enum.auto()
|
|
||||||
WHOLE = enum.auto()
|
|
||||||
|
|
||||||
class Session():
|
class Session():
|
||||||
NNTP_VERSION = 2
|
NNTP_VERSION = 2
|
||||||
NNTP_CAPABILITIES = [
|
NNTP_CAPABILITIES = [
|
||||||
|
|
Loading…
Add table
Reference in a new issue