Skip to content

Commit

Permalink
autofix ruff warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
noxan committed Oct 6, 2023
1 parent 2bfc3dd commit 6de6d21
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion referral/compat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.conf import settings
import django
from django.conf import settings

__all__ = ["User", "AUTH_USER_MODEL"]

Expand Down
3 changes: 2 additions & 1 deletion referral/middleware.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.utils.deprecation import MiddlewareMixin

from . import settings
from .models import Referrer
from django.utils.deprecation import MiddlewareMixin


class ReferrerMiddleware(MiddlewareMixin):
Expand Down
2 changes: 1 addition & 1 deletion referral/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from __future__ import unicode_literals

import django.db.models.deletion
from django.db import models, migrations
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion referral/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.db import models
from django.utils.translation import gettext_lazy as _

from .compat import User
from . import settings
from .compat import User


class Campaign(models.Model):
Expand Down
1 change: 1 addition & 0 deletions referral/tests/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Django settings for tests."""

import os

import django

BASE_DIR = os.path.dirname(os.path.dirname(__file__))
Expand Down
4 changes: 2 additions & 2 deletions referral/tests/test_middlewares.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from django.test import TestCase
from django.http import HttpRequest
from django.test import TestCase

from referral import settings
from referral.middleware import ReferrerMiddleware
from referral.models import Referrer
from referral import settings


class ReferrerMiddlewareTest(TestCase):
Expand Down
4 changes: 2 additions & 2 deletions referral/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from django.http import HttpRequest
from django.test import TestCase

from referral.models import UserReferrer
from referral import settings
from referral.models import UserReferrer
from referral.tests.factories import (
CampaignFactory,
ReferrerFactory,
UserReferrerFactory,
UserFactory,
UserReferrerFactory,
)


Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from setuptools import setup, find_packages

from setuptools import find_packages, setup

import referral

Expand Down

0 comments on commit 6de6d21

Please sign in to comment.