MAINT: Use explicit syntax for relative imports.

Python 3 requires using dot syntax for relative imports,
otherwise the import is treated as an absolute import, i.e.
an import of a module from outside of the project.

By using dot syntax now, imports should be compatible with both
Python 2.7 and Python 3.
This commit is contained in:
Eddie Hebert
2013-07-02 15:54:12 -04:00
parent b77780c783
commit 158988d184
7 changed files with 14 additions and 14 deletions
+4 -4
View File
@@ -6,10 +6,10 @@ Zipline
# it is a place to expose the public interfaces.
import data
import finance
import gens
import utils
from . import data
from . import finance
from . import gens
from . import utils
from algorithm import TradingAlgorithm
+1 -1
View File
@@ -1,3 +1,3 @@
import loader
from . import loader
__all__ = ['loader']
+1 -1
View File
@@ -22,7 +22,7 @@ from functools import partial
import requests
from loader_utils import (
from . loader_utils import (
date_conversion,
source_to_records,
Mapping
+1 -1
View File
@@ -22,7 +22,7 @@ from datetime import timedelta
import logbook
from treasuries import get_treasury_data
from . treasuries import get_treasury_data
import benchmarks
from benchmarks import get_benchmark_returns
+1 -1
View File
@@ -19,7 +19,7 @@ import requests
from collections import OrderedDict
import xml.etree.ElementTree as ET
from loader_utils import (
from . loader_utils import (
guarded_conversion,
safe_int,
Mapping,
+1 -1
View File
@@ -15,7 +15,7 @@
from collections import defaultdict
import datetime
from utils.protocol_utils import Enum
from . utils.protocol_utils import Enum
# Datasource type should completely determine the other fields of a
# message with its type.
+5 -5
View File
@@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from mavg import MovingAverage
from stddev import MovingStandardDev
from vwap import MovingVWAP
from returns import Returns
from utils import BatchTransform, batch_transform
from . mavg import MovingAverage
from . stddev import MovingStandardDev
from . vwap import MovingVWAP
from . returns import Returns
from . utils import BatchTransform, batch_transform
__all__ = [
'MovingAverage',