mirror of https://github.com/zulip/zulip.git
Enable absolute imports for non-third-party code where it was omitted previously
(imported from commit 34856ac32c6b94b614273a6fe46c87a314058d9b)
This commit is contained in:
parent
356b400500
commit
52309b5789
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
import logging
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from django.core.exceptions import PermissionDenied
|
||||
|
||||
class RateLimited(PermissionDenied):
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
from django.contrib.staticfiles.finders import FileSystemFinder
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
|
||||
import zerver.models
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import ujson
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from diff_match_patch import diff_match_patch
|
||||
import platform
|
||||
import logging
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
|
||||
from django.db.models import F, Q
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from zerver.models import Realm
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from zerver.models import Realm
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue