aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2014-08-23 01:15:38 +0200
committerLaurent Bachelier <laurent@bachelier.name>2014-08-23 01:15:38 +0200
commitac827d832a47bf1ddf09f7ec37f53c5531a6870d (patch)
tree701ad7096c37c32d8e9cbd7758f89aec87b2d823
parentAdd requirements (diff)
downloadbrutha-ac827d832a47bf1ddf09f7ec37f53c5531a6870d.tar.xz
Better import style
-rw-r--r--brutha/__main__.py8
-rw-r--r--brutha/directory.py7
-rw-r--r--brutha/file.py4
-rw-r--r--brutha/output.py4
-rw-r--r--brutha/tree.py8
-rw-r--r--brutha/util.py1
6 files changed, 20 insertions, 12 deletions
diff --git a/brutha/__main__.py b/brutha/__main__.py
index 0517140..4e31f33 100644
--- a/brutha/__main__.py
+++ b/brutha/__main__.py
@@ -1,12 +1,14 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
+
import argparse
import sys
from StringIO import StringIO
-from brutha.output import OUTPUTS
-from brutha.tree import Tree
-from brutha.util import default_output, detect_cores
+from .output import OUTPUTS
+from .tree import Tree
+from .util import default_output, detect_cores
def main():
diff --git a/brutha/directory.py b/brutha/directory.py
index 886c506..a0f590e 100644
--- a/brutha/directory.py
+++ b/brutha/directory.py
@@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
-import re
import os
+import re
-from brutha.file import FlacFile, LossyFile
-from brutha.util import escape
+from .file import FlacFile, LossyFile
+from .util import escape
class NotInteresting(Exception):
diff --git a/brutha/file.py b/brutha/file.py
index e9486d3..1531105 100644
--- a/brutha/file.py
+++ b/brutha/file.py
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
+
import os
import re
from datetime import datetime
@@ -7,7 +9,7 @@ from time import localtime
import mutagen
from mutagen.flac import FLACNoHeaderError, FLACVorbisError
-from brutha.util import escape
+from .util import escape
class NotAllowed(Exception):
diff --git a/brutha/output.py b/brutha/output.py
index cb9b2de..6f1e456 100644
--- a/brutha/output.py
+++ b/brutha/output.py
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
-from __future__ import division
+from __future__ import absolute_import, division
import subprocess
-from brutha.util import require_executable, uprint
+from .util import require_executable, uprint
def pbar(cur, total, color=True):
diff --git a/brutha/tree.py b/brutha/tree.py
index 7259f9b..848ba2c 100644
--- a/brutha/tree.py
+++ b/brutha/tree.py
@@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
import os
-from brutha.directory import Directory, NotInteresting
-from brutha.file import NotAllowed
-from brutha.util import escape
+
+from .directory import Directory, NotInteresting
+from .file import NotAllowed
+from .util import escape
class Tree(object):
diff --git a/brutha/util.py b/brutha/util.py
index 723a374..9dde432 100644
--- a/brutha/util.py
+++ b/brutha/util.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+from __future__ import absolute_import
import os
import re