Commits

Aren Olson committed 8495371

remove absolute_import from metadata, and use absolute imports

Comments (0)

Files changed (17)

 EXAILESHAREDIR 	= $(DESTDIR)$(PREFIX)/share/exaile
 EXAILECONFDIR 	= $(DESTDIR)$(XDGCONFDIR)/exaile
 
+.PHONY: dist test coverage clean sanitycheck
+
 all: compile locale
 	@echo "Ready to install..."
 
 plugins_dist:
 	make -C plugins dist
 
-.PHONY: clean
 
 clean:
 	-find . -name "*.~[0-9]~" -exec rm -f {} \;
 	tar --bzip2 --format=posix -cf build/exaile-po.tar.bz2 po/ \
 	    --transform s/po/./
 
-.PHONY: dist test coverage
 
 dist:
 	mkdir -p dist
 	nosetests -w tests --with-coverage --cover-package=xl; \
 	mkdir -p coverage; \
 	coverage html -d coverage
+
+lint_errors:
+	-pylint -e --rcfile tools/pylint.cfg xl xlgui 2> /dev/null
+
+sanitycheck: lint_errors test

xl/metadata/__init__.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
+
 
 import os
 import gio
 
-from ._base import BaseFormat, NotWritable, NotReadable
+from xl.metadata._base import BaseFormat, NotWritable, NotReadable
 import urlparse
 
-from . import (ape, asf, flac, mod, mp3, mp4, mpc, ogg, sid, speex,
+from xl.metadata import (ape, asf, flac, mod, mp3, mp4, mpc, ogg, sid, speex,
         tta, wav, wv)
 
 #: dictionary mapping extensions to Format classes.

xl/metadata/_apev2.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import apev2
 
 

xl/metadata/_id3.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import id3
 
 

xl/metadata/ape.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._apev2 import ApeFormat
+
+from xl.metadata._apev2 import ApeFormat
 from mutagen import monkeysaudio
 
 class MonkeysFormat(ApeFormat):

xl/metadata/asf.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import asf
 
 class AsfFormat(BaseFormat):

xl/metadata/flac.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import flac
 
 class FlacFormat(BaseFormat):

xl/metadata/mod.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import FileType
 
 import os

xl/metadata/mp3.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._id3 import ID3Format
+
+from xl.metadata._id3 import ID3Format
 from mutagen import mp3
 
 class MP3Format(ID3Format):

xl/metadata/mp4.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import mp4
 
 class MP4Format(BaseFormat):

xl/metadata/mpc.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._apev2 import ApeFormat
+
+from xl.metadata._apev2 import ApeFormat
 from mutagen import musepack
 
 class MpcFormat(ApeFormat):

xl/metadata/ogg.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import oggvorbis
 
 class OggFormat(BaseFormat):

xl/metadata/sid.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import FileType
 
 class SidFormat(BaseFormat):

xl/metadata/speex.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._base import BaseFormat
+
+from xl.metadata._base import BaseFormat
 from mutagen import oggspeex
 
 class SpeexFormat(BaseFormat):

xl/metadata/tta.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._id3 import ID3Format
+
+from xl.metadata._id3 import ID3Format
 from mutagen import trueaudio
 
 class TTAFormat(ID3Format):

xl/metadata/wav.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
+
 
 import wave
 import sunau
 
 import gio
 
-from ._base import BaseFormat
+from xl.metadata._base import BaseFormat
 
 type_map = {
         "aifc": aifc,

xl/metadata/wv.py

 # do so. If you do not wish to do so, delete this exception statement
 # from your version.
 
-from __future__ import absolute_import
 
-from ._apev2 import ApeFormat
+
+from xl.metadata._apev2 import ApeFormat
 from mutagen import wavpack
 
 class WavpackFormat(ApeFormat):