Skip to content

Commit

Permalink
Reworked module imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Drayer committed Dec 29, 2014
1 parent e7c019e commit 0dd1772
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion milestones/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
Milestones app initialization module
"""
from milestones import receivers
from . import receivers
6 changes: 3 additions & 3 deletions milestones/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
Note the terminology difference at this layer vs. Data -- add/edit/get/remove
"""
import milestones.data as data
import milestones.exceptions as exceptions
import milestones.validators as validators
from . import data
from . import exceptions
from . import validators


# PRIVATE/INTERNAL FUNCTIONS
Expand Down
6 changes: 3 additions & 3 deletions milestones/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
else:
import milestones.resources as remote
"""
import milestones.exceptions as exceptions
import milestones.models as internal
import milestones.serializers as serializers
from . import exceptions
from . import models as internal
from . import serializers


# PRIVATE/INTERNAL METHODS
Expand Down
6 changes: 3 additions & 3 deletions milestones/receivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"""
from django.dispatch import receiver

import milestones.api as api
from . import api

try:
import util.signals as signals # pylint: disable=import-error
from util import signals # pylint: disable=import-error
except ImportError:
import milestones.tests.mocks.signals as signals
from milestones.tests.mocks import signals


@receiver(signals.course_deleted)
Expand Down
4 changes: 2 additions & 2 deletions milestones/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Data layer serialization operations. Converts querysets to simple
python containers (mainly arrays and dicts).
"""
from milestones.models import Milestone
from . import models


def serialize_milestone(milestone):
Expand Down Expand Up @@ -59,7 +59,7 @@ def deserialize_milestone(milestone_dict):
"""
Milestone dict-to-object serialization
"""
return Milestone(
return models.Milestone(
id=milestone_dict.get('id'),
name=milestone_dict.get('name'),
namespace=milestone_dict.get('namespace'),
Expand Down

0 comments on commit 0dd1772

Please sign in to comment.