From 1672de054f6ef358409c57a426c710be04330606 Mon Sep 17 00:00:00 2001 From: Jean-Charles Lefebvre Date: Wed, 26 Feb 2020 15:11:46 +0100 Subject: [PATCH] relative imports --- toml/__init__.py | 4 ++-- toml/decoder.py | 2 +- toml/encoder.py | 2 +- toml/ordered.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/toml/__init__.py b/toml/__init__.py index 7e13a0c..338d74c 100644 --- a/toml/__init__.py +++ b/toml/__init__.py @@ -3,8 +3,8 @@ Released under the MIT license. """ -from toml import encoder -from toml import decoder +from . import encoder +from . import decoder __version__ = "0.10.1" _spec_ = "0.5.0" diff --git a/toml/decoder.py b/toml/decoder.py index a24c04a..ca26d91 100644 --- a/toml/decoder.py +++ b/toml/decoder.py @@ -4,7 +4,7 @@ import re import sys -from toml.tz import TomlTz +from .tz import TomlTz if sys.version_info < (3,): _range = xrange # noqa: F821 diff --git a/toml/encoder.py b/toml/encoder.py index d9e557e..01ead5c 100644 --- a/toml/encoder.py +++ b/toml/encoder.py @@ -3,7 +3,7 @@ import sys from decimal import Decimal -from toml.decoder import InlineTableDict +from .decoder import InlineTableDict if sys.version_info >= (3,): unicode = str diff --git a/toml/ordered.py b/toml/ordered.py index 9c20c41..ab443c4 100644 --- a/toml/ordered.py +++ b/toml/ordered.py @@ -1,6 +1,6 @@ from collections import OrderedDict -from toml import TomlEncoder -from toml import TomlDecoder +from .encoder import TomlEncoder +from .decoder import TomlDecoder class TomlOrderedDecoder(TomlDecoder):