From 9df39a8996670e2e2629607f22cea5aa4d08aa1e Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Wed, 6 Apr 2016 20:26:59 -0700 Subject: [PATCH] Adding from __future__ imports --- caravel/__init__.py | 4 ++++ caravel/ascii_art.py | 5 +++++ caravel/bin/caravel | 4 ++++ caravel/config.py | 5 +++++ caravel/data/__init__.py | 4 ++++ caravel/data/countries.py | 4 ++++ caravel/forms.py | 4 ++++ caravel/models.py | 4 ++++ caravel/utils.py | 4 ++++ caravel/views.py | 4 ++++ caravel/viz.py | 4 ++++ 11 files changed, 46 insertions(+) diff --git a/caravel/__init__.py b/caravel/__init__.py index c3517f0c29b66..e424499b741dd 100644 --- a/caravel/__init__.py +++ b/caravel/__init__.py @@ -1,4 +1,8 @@ """Package's main module!""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals import logging import os diff --git a/caravel/ascii_art.py b/caravel/ascii_art.py index 4804469480c82..acb41ccf9475a 100644 --- a/caravel/ascii_art.py +++ b/caravel/ascii_art.py @@ -1,3 +1,8 @@ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + error = ( "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n"+ "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\n"+ diff --git a/caravel/bin/caravel b/caravel/bin/caravel index 5400b949577cb..5c59c08c7fbff 100755 --- a/caravel/bin/caravel +++ b/caravel/bin/caravel @@ -1,4 +1,8 @@ #!/usr/bin/env python +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals from datetime import datetime import logging diff --git a/caravel/config.py b/caravel/config.py index 01876998da82c..33d244a97cbed 100644 --- a/caravel/config.py +++ b/caravel/config.py @@ -4,6 +4,11 @@ in your PYTHONPATH as there is a ``from local_config import *`` at the end of this file. """ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + import os from flask_appbuilder.security.manager import AUTH_DB from dateutil import tz diff --git a/caravel/data/__init__.py b/caravel/data/__init__.py index 7d1f06994890d..43ce7d92cb068 100644 --- a/caravel/data/__init__.py +++ b/caravel/data/__init__.py @@ -1,4 +1,8 @@ """Loads datasets, dashboards and slices in a new caravel instance""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals import gzip import json diff --git a/caravel/data/countries.py b/caravel/data/countries.py index 663c7d575926f..b725cc22ba79e 100644 --- a/caravel/data/countries.py +++ b/caravel/data/countries.py @@ -1,4 +1,8 @@ """This module contains data related to countries and is used for geo mapping""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals countries = [ { diff --git a/caravel/forms.py b/caravel/forms.py index cfb59653dfad1..159437adc4aa9 100644 --- a/caravel/forms.py +++ b/caravel/forms.py @@ -1,4 +1,8 @@ """Contains the logic to create cohesive forms on the explore view""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals from wtforms import ( Form, SelectMultipleField, SelectField, TextField, TextAreaField, diff --git a/caravel/models.py b/caravel/models.py index b4bcdd3f1e97f..5ea0c3bb47c70 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -1,4 +1,8 @@ """A collection of ORM sqlalchemy models for Caravel""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals from copy import deepcopy, copy from collections import namedtuple diff --git a/caravel/utils.py b/caravel/utils.py index a67ea650f224b..4bf33c0e33568 100644 --- a/caravel/utils.py +++ b/caravel/utils.py @@ -1,4 +1,8 @@ """Utility functions used across Caravel""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals from datetime import datetime import hashlib diff --git a/caravel/views.py b/caravel/views.py index 267957c89d226..8ab2fc8b292ce 100644 --- a/caravel/views.py +++ b/caravel/views.py @@ -1,4 +1,8 @@ """Flask web views for Caravel""" +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals from datetime import datetime import json diff --git a/caravel/viz.py b/caravel/viz.py index 20224dc446935..ba9592bfb1386 100644 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -3,6 +3,10 @@ These objects represent the backend of all the visualizations that Caravel can render. """ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals from collections import OrderedDict, defaultdict from datetime import datetime, timedelta