Skip to content

Re-export parse/format classes from main module #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions llsd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,9 @@
"""
from llsd.base import (_LLSD, BINARY_MIME_TYPE, NOTATION_MIME_TYPE, XML_MIME_TYPE, LLSDParseError,
LLSDSerializationError, LongType, UnicodeType, binary, starts_with, undef, uri)
from llsd.serde_binary import format_binary, parse_binary
from llsd.serde_notation import format_notation, parse_notation
from llsd.serde_xml import format_pretty_xml, format_xml, parse_xml

__all__ = [
"BINARY_MIME_TYPE",
"LLSD",
"LLSDParseError",
"LLSDSerializationError",
"LongType",
"NOTATION_MIME_TYPE",
"UnicodeType",
"XML_MIME_TYPE",
"binary",
"format_binary",
"format_notation",
"format_pretty_xml",
"format_xml",
"parse",
"parse_binary",
"parse_notation",
"parse_xml",
"undef",
"uri",
]
from llsd.serde_binary import LLSDBinaryParser, format_binary, parse_binary
from llsd.serde_notation import LLSDNotationFormatter, LLSDNotationParser, format_notation, parse_notation
from llsd.serde_xml import LLSDXMLFormatter, LLSDXMLPrettyFormatter, format_pretty_xml, format_xml, parse_xml


def parse(something, mime_type = None):
Expand Down Expand Up @@ -81,4 +59,4 @@ def __str__(self):
as_xml = staticmethod(format_xml)
as_pretty_xml = staticmethod(format_pretty_xml)
as_binary = staticmethod(format_binary)
as_notation = staticmethod(format_notation)
as_notation = staticmethod(format_notation)