Skip to content

Commit

Permalink
Update imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocaccamo committed Nov 3, 2023
1 parent dd32219 commit 983d9ac
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion tests/test_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.core.management import call_command
from django.test import TestCase

from .models import CategoryFixtures
from tests.models import CategoryFixtures


class TreeNodeFixturesTestCase(TestCase):
Expand Down
7 changes: 3 additions & 4 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
from django.test import TransactionTestCase
from django.utils.encoding import force_str

from treenode.cache import clear_cache
from treenode.utils import join_pks

from .models import (
from tests.models import (
Category,
CategoryWithoutDisplayField,
CategoryWithStringPk,
CategoryWithUUIDPk,
)
from treenode.cache import clear_cache
from treenode.utils import join_pks


# flake8: noqa
Expand Down
3 changes: 1 addition & 2 deletions tests/test_performance.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from django.conf import settings
from django.test import TransactionTestCase

from tests.models import Category
from treenode.debug import debug_performance
from treenode.signals import no_signals

from .models import Category


class TreeNodePerformanceTestCase(TransactionTestCase):
def setUp(self):
Expand Down
2 changes: 1 addition & 1 deletion treenode/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib import admin
from django.utils.safestring import mark_safe

from .forms import TreeNodeForm
from treenode.forms import TreeNodeForm


class TreeNodeModelAdmin(admin.ModelAdmin):
Expand Down
2 changes: 1 addition & 1 deletion treenode/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.core.cache import cache, caches

from .utils import split_pks
from treenode.utils import split_pks


def _get_cache():
Expand Down
2 changes: 1 addition & 1 deletion treenode/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django import forms

from .utils import split_pks
from treenode.utils import split_pks


class TreeNodeForm(forms.ModelForm):
Expand Down
12 changes: 6 additions & 6 deletions treenode/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from django.utils.text import slugify
from django.utils.translation import gettext_lazy as _

from . import classproperty
from .cache import clear_cache, query_cache, update_cache
from .debug import debug_performance
from .memory import clear_refs, update_refs
from .signals import connect_signals, no_signals
from .utils import join_pks, split_pks
from treenode import classproperty
from treenode.cache import clear_cache, query_cache, update_cache
from treenode.debug import debug_performance
from treenode.memory import clear_refs, update_refs
from treenode.signals import connect_signals, no_signals
from treenode.utils import join_pks, split_pks


class TreeNodeModel(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion treenode/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.db.models.signals import post_delete, post_init, post_migrate, post_save

from .memory import set_ref
from treenode.memory import set_ref


def __is_treenode_model(sender):
Expand Down

0 comments on commit 983d9ac

Please sign in to comment.