1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-24 15:11:30 +02:00

Cut off cross importing things.

There was (and perhaps it exists in other modules, need to check) a bad
habit of importing objects out of module A into B just to be able of
import those object from module B. In this case there was import from
module config_base into module config. This commit fix this.
This commit is contained in:
2020-09-06 18:23:05 +02:00
parent de22960d26
commit 6fdcc029bb
8 changed files with 14 additions and 23 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ from ebook_converter.ebooks.metadata.book.base import Metadata
from ebook_converter.utils.date import parse_date, isoformat
from ebook_converter.utils.localization import get_lang, canonicalize_lang
from ebook_converter.utils.cleantext import clean_ascii_chars, clean_xml_chars
from ebook_converter.utils.config import tweaks
from ebook_converter.utils.config_base import tweaks
from ebook_converter.polyglot.urllib import unquote
@@ -504,7 +504,7 @@ class TitleSortField(MetadataField):
def serialize_user_metadata(metadata_elem, all_user_metadata,
tail='\n'+(' '*8)):
from ebook_converter.utils.config import to_json
from ebook_converter.utils.config_base import to_json
from ebook_converter.ebooks.metadata.book.json_codec import \
object_to_unicode, encode_is_multiple
@@ -654,7 +654,7 @@ class OPF(object): # {{{
def read_user_metadata(self):
self._user_metadata_ = {}
temp = Metadata('x', ['x'])
from ebook_converter.utils.config import from_json
from ebook_converter.utils.config_base import from_json
from ebook_converter.ebooks.metadata.book.json_codec import \
decode_is_multiple
elems = self.root.xpath('//*[name() = "meta" and starts-with(@name,'