Enable absolute imports for non-third-party code where it was omitted previously

(imported from commit 34856ac32c6b94b614273a6fe46c87a314058d9b)
This commit is contained in:
Luke Faraone 2013-10-10 15:37:26 -04:00
parent 356b400500
commit 52309b5789
17 changed files with 34 additions and 1 deletions

View File

@ -1,4 +1,6 @@
#!/usr/bin/env python
from __future__ import absolute_import
import sys
from os import path
import logging

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
from django.core.exceptions import PermissionDenied
class RateLimited(PermissionDenied):

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
import re
from django.contrib.staticfiles.finders import FileSystemFinder

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
import re
import zerver.models

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
import markdown
import logging
import traceback
@ -79,7 +81,7 @@ def hash_embedly_url(link):
@cache_with_key(lambda tweet_id: tweet_id, cache_name="database", with_statsd_key="tweet_data")
def fetch_tweet_data(tweet_id):
if settings.TEST_SUITE:
import testing_mocks
from . import testing_mocks
res = testing_mocks.twitter(tweet_id)
else:
if settings.TWITTER_CONSUMER_KEY == '' or \

View File

@ -1,3 +1,4 @@
from __future__ import absolute_import
import ujson

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
from diff_match_patch import diff_match_patch
import platform
import logging

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
import logging
from datetime import datetime, timedelta

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
import re
from django.db.models import F, Q

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
from optparse import make_option
from django.core.management.base import BaseCommand
from zerver.models import Message, Realm, Stream, Recipient

View File

@ -15,6 +15,8 @@ recipient address and retrieve, forward, and archive the message.
Run this management command out of a cron job.
"""
from __future__ import absolute_import
import email
from os import path
from email.header import decode_header

View File

@ -1,5 +1,7 @@
#!/usr/bin/python
from __future__ import absolute_import
from django.core.management.base import BaseCommand
from zerver.models import Realm

View File

@ -1,5 +1,7 @@
#!/usr/bin/python
from __future__ import absolute_import
from django.core.management.base import BaseCommand
from zerver.lib.utils import generate_random_token

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
from django.core.management.base import BaseCommand
from zerver.models import Realm

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
from django.core.management.base import BaseCommand
from django.db.models import Q
from zerver.models import Realm, Stream, Message, Subscription, Recipient

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
from django.conf import settings
from django.contrib.staticfiles.storage import CachedFilesMixin, StaticFilesStorage
from pipeline.storage import PipelineMixin

View File

@ -1,3 +1,5 @@
from __future__ import absolute_import
from django.template import Node, Library, TemplateSyntaxError
from django.conf import settings
from django.contrib.staticfiles.storage import staticfiles_storage