Imports cleanup
authorThierry Florac <thierry.florac@onf.fr>
Mon, 11 Jun 2018 12:45:13 +0200
changeset 64 fc04752a10a5
parent 63 95060873cdab
child 65 7ef9d814b2d2
Imports cleanup
src/pyams_content_es/component/paragraph.py
--- a/src/pyams_content_es/component/paragraph.py	Mon Jun 11 12:43:02 2018 +0200
+++ b/src/pyams_content_es/component/paragraph.py	Mon Jun 11 12:45:13 2018 +0200
@@ -9,15 +9,6 @@
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
 #
-from pyams_content.component.paragraph import IBaseParagraph
-from pyams_content.component.paragraph.interfaces.contact import IContactParagraph
-from pyams_content.component.paragraph.interfaces.frame import IFrameParagraph
-from pyams_content.component.paragraph.interfaces.keypoint import IKeypointsParagraph
-from pyams_content.component.paragraph.interfaces.verbatim import IVerbatimParagraph
-from pyams_content.component.paragraph.interfaces.video import IVideoParagraph
-from pyams_content.component.video.interfaces import IExternalVideoParagraph
-from pyams_i18n.interfaces import II18nManager
-from pyams_utils.traversing import get_parent
 
 __docformat__ = 'restructuredtext'
 
@@ -27,15 +18,24 @@
 # import interfaces
 from pyams_content.component.gallery.interfaces import IGalleryParagraph
 from pyams_content.component.illustration.interfaces import IIllustrationParagraph
-from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
+    IBaseParagraph
+from pyams_content.component.paragraph.interfaces.contact import IContactParagraph
+from pyams_content.component.paragraph.interfaces.frame import IFrameParagraph
 from pyams_content.component.paragraph.interfaces.header import IHeaderParagraph
 from pyams_content.component.paragraph.interfaces.html import IHTMLParagraph, IRawParagraph
+from pyams_content.component.paragraph.interfaces.keypoint import IKeypointsParagraph
+from pyams_content.component.paragraph.interfaces.verbatim import IVerbatimParagraph
+from pyams_content.component.paragraph.interfaces.video import IVideoParagraph
+from pyams_content.component.video.interfaces import IExternalVideoParagraph
 from pyams_content.shared.imagemap.interfaces import IImageMapParagraph
 from pyams_content_es.interfaces import IDocumentIndexInfo
+from pyams_i18n.interfaces import II18nManager
 
 # import packages
 from pyams_utils.adapter import adapter_config
 from pyams_utils.html import html_to_text
+from pyams_utils.traversing import get_parent
 
 
 @adapter_config(name='body', context=IParagraphContainerTarget, provides=IDocumentIndexInfo)
@@ -215,7 +215,7 @@
     for lang, body in (getattr(paragraph, 'body', {}) or {}).items():
         if body:
             info[lang] = '{old}\n{body}'.format(old=info.get(lang, ''),
-                                                body=html_to_text(body.repplace('\r', '')))
+                                                body=html_to_text(body.replace('\r', '')))
     return info