Use isort to sort import

…so that they all have the same structure.
This commit is contained in:
Lars Kiesow 2018-03-04 20:05:29 +01:00
parent c92a340f88
commit 9026316391
No known key found for this signature in database
GPG key ID: 5DAFE8D9C823CE73
15 changed files with 31 additions and 13 deletions

View file

@ -8,9 +8,10 @@
:license: FreeBSD and LGPL, see license.* for more details. :license: FreeBSD and LGPL, see license.* for more details.
''' '''
from feedgen.feed import FeedGenerator
import sys import sys
from feedgen.feed import FeedGenerator
USAGE = ''' USAGE = '''
Usage: python -m feedgen [OPTION] Usage: python -m feedgen [OPTION]

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import sys import sys
if sys.version_info[0] >= 3: if sys.version_info[0] >= 3:
string_types = str string_types = str
else: else:

View file

@ -8,12 +8,14 @@
:license: FreeBSD and LGPL, see license.* for more details. :license: FreeBSD and LGPL, see license.* for more details.
''' '''
from lxml import etree
from datetime import datetime from datetime import datetime
import dateutil.parser import dateutil.parser
import dateutil.tz import dateutil.tz
from feedgen.util import ensure_format, formatRFC2822 from lxml import etree
from feedgen.compat import string_types from feedgen.compat import string_types
from feedgen.util import ensure_format, formatRFC2822
class FeedEntry(object): class FeedEntry(object):

View file

@ -14,6 +14,7 @@
''' '''
from lxml import etree from lxml import etree
from feedgen.ext.base import BaseExtension from feedgen.ext.base import BaseExtension

View file

@ -11,8 +11,9 @@
''' '''
from lxml import etree from lxml import etree
from feedgen.ext.base import BaseEntryExtension, BaseExtension
from feedgen.util import ensure_format from feedgen.util import ensure_format
from feedgen.ext.base import BaseExtension, BaseEntryExtension
MEDIA_NS = 'http://search.yahoo.com/mrss/' MEDIA_NS = 'http://search.yahoo.com/mrss/'

View file

@ -11,9 +11,10 @@
''' '''
from lxml import etree from lxml import etree
from feedgen.compat import string_types
from feedgen.ext.base import BaseExtension from feedgen.ext.base import BaseExtension
from feedgen.util import ensure_format from feedgen.util import ensure_format
from feedgen.compat import string_types
class PodcastExtension(BaseExtension): class PodcastExtension(BaseExtension):

View file

@ -11,6 +11,7 @@
''' '''
from lxml import etree from lxml import etree
from feedgen.ext.base import BaseEntryExtension from feedgen.ext.base import BaseEntryExtension

View file

@ -11,6 +11,7 @@ http://web.resource.org/rss/1.0/modules/syndication/
''' '''
from lxml import etree from lxml import etree
from feedgen.ext.base import BaseExtension from feedgen.ext.base import BaseExtension
SYNDICATION_NS = 'http://purl.org/rss/1.0/modules/syndication/' SYNDICATION_NS = 'http://purl.org/rss/1.0/modules/syndication/'

View file

@ -11,7 +11,8 @@
''' '''
from lxml import etree from lxml import etree
from feedgen.ext.base import BaseExtension, BaseEntryExtension
from feedgen.ext.base import BaseEntryExtension, BaseExtension
TORRENT_NS = 'http://xmlns.ezrss.it/0.1/dtd/' TORRENT_NS = 'http://xmlns.ezrss.it/0.1/dtd/'

View file

@ -9,16 +9,17 @@
''' '''
from lxml import etree import sys
from datetime import datetime from datetime import datetime
import dateutil.parser import dateutil.parser
import dateutil.tz import dateutil.tz
from lxml import etree
import feedgen.version
from feedgen.compat import string_types
from feedgen.entry import FeedEntry from feedgen.entry import FeedEntry
from feedgen.util import ensure_format, formatRFC2822 from feedgen.util import ensure_format, formatRFC2822
import feedgen.version
import sys
from feedgen.compat import string_types
_feedgen_version = feedgen.version.version_str _feedgen_version = feedgen.version.version_str

View file

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from setuptools import setup from setuptools import setup
import feedgen.version import feedgen.version
packages = ['feedgen', 'feedgen/ext'] packages = ['feedgen', 'feedgen/ext']

View file

@ -7,6 +7,7 @@ These are test cases for a basic entry.
""" """
import unittest import unittest
from feedgen.feed import FeedGenerator from feedgen.feed import FeedGenerator

View file

@ -5,9 +5,11 @@ Tests for extensions
""" """
import unittest import unittest
from feedgen.feed import FeedGenerator
from lxml import etree from lxml import etree
from feedgen.feed import FeedGenerator
class TestExtensionSyndication(unittest.TestCase): class TestExtensionSyndication(unittest.TestCase):

View file

@ -10,9 +10,11 @@ A basic feed does not contain entries so far.
import os import os
import tempfile import tempfile
import unittest import unittest
from lxml import etree from lxml import etree
from feedgen.ext.dc import DcEntryExtension, DcExtension
from feedgen.feed import FeedGenerator from feedgen.feed import FeedGenerator
from feedgen.ext.dc import DcExtension, DcEntryExtension
class TestSequenceFunctions(unittest.TestCase): class TestSequenceFunctions(unittest.TestCase):

View file

@ -8,6 +8,7 @@ import os
import sys import sys
import tempfile import tempfile
import unittest import unittest
from feedgen import __main__ from feedgen import __main__