Skip to content

Commit

Permalink
isort: two lines after imports
Browse files Browse the repository at this point in the history
That's the style I'm used to.
  • Loading branch information
bluetech committed Oct 17, 2021
1 parent 864ef61 commit 4e125e1
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions pytest_django/asserts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
LiveServerTestCase, SimpleTestCase, TestCase, TransactionTestCase,
)


TYPE_CHECKING = False


Expand Down
1 change: 1 addition & 0 deletions pytest_django/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .django_compat import is_django_unittest
from .lazy_django import get_django_version, skip_if_no_django


TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Literal
Expand Down
1 change: 1 addition & 0 deletions pytest_django/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from .fixtures import transactional_db # noqa
from .lazy_django import django_settings_is_configured, skip_if_no_django


TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import ContextManager, NoReturn
Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/db_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from django.conf import settings
from django.utils.encoding import force_str


# Construct names for the "inner" database used in runpytest tests
_settings = settings.DATABASES["default"]

Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/settings_mysql_innodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .settings_base import * # noqa: F401 F403


DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/settings_mysql_myisam.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .settings_base import * # noqa: F401 F403


DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/settings_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .settings_base import * # noqa: F401 F403


# PyPy compatibility
try:
from psycopg2cffi import compat
Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/settings_sqlite.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .settings_base import * # noqa: F401 F403


DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/settings_sqlite_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .settings_base import * # noqa: F401 F403


# This is a SQLite configuration, which uses a file based database for
# tests (via setting TEST_NAME / TEST['NAME']).

Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .app import views


urlpatterns = [
path("item_count/", views.item_count),
path("admin-required/", views.admin_required_view),
Expand Down
1 change: 1 addition & 0 deletions pytest_django_test/urls_overridden.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.http import HttpResponse
from django.urls import path


urlpatterns = [
path("overridden_url/", lambda r: HttpResponse("Overridden urlconf works!"))
]
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ forced_separate = tests,pytest_django,pytest_django_test
combine_as_imports = true
default_section = THIRDPARTY
include_trailing_comma = true
known_first_party = formtools
line_length = 79
multi_line_output = 5
lines_after_imports = 2

[mypy]
check_untyped_defs = True
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pytest
from django.conf import settings


pytest_plugins = "pytester"

REPOSITORY_ROOT = pathlib.Path(__file__).parent
Expand Down
1 change: 1 addition & 0 deletions tests/test_django_configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
import pytest


pytest.importorskip("configurations")


Expand Down
1 change: 1 addition & 0 deletions tests/test_django_settings_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pytest


BARE_SETTINGS = """
# At least one database must be configured
DATABASES = {
Expand Down
1 change: 1 addition & 0 deletions tests/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from pytest_django_test.app.models import Item


# It doesn't matter which order all the _again methods are run, we just need
# to check the environment remains constant.
# This is possible with some of the testdir magic, but this is the lazy way
Expand Down

0 comments on commit 4e125e1

Please sign in to comment.