Skip to content

Commit c7bf0c5

Browse files
Kyle-Verhoogmergify[bot]majorgreys
authored
Lint/format all Python sources in repo (#2643)
* Update linting, formatting commands Our linting and formatting commands were not considering new directories like benchmarks/ which also contain python code which we should lint and format. * format all the things * lint all the things Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Tahir H. Butt <[email protected]>
1 parent 8f3ba0f commit c7bf0c5

File tree

20 files changed

+42
-23
lines changed

20 files changed

+42
-23
lines changed

benchmarks/django_simple/config/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import environ
77

8+
89
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
910
# ddtrace_django/
1011
APPS_DIR = ROOT_DIR / "ddtrace_django"

benchmarks/django_simple/config/settings/production.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .base import * # noqa
22
from .base import env
33

4+
45
# GENERAL
56
# ------------------------------------------------------------------------------
67
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key

benchmarks/django_simple/config/urls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
from django.conf import settings
22
from django.conf.urls.static import static
33
from django.contrib import admin
4-
from django.urls import include, path
4+
from django.urls import include
5+
from django.urls import path
56
from django.views import defaults as default_views
67
from django.views.generic import TemplateView
78

9+
810
urlpatterns = [
911
path("", TemplateView.as_view(template_name="pages/home.html"), name="home"),
1012
path("about/", TemplateView.as_view(template_name="pages/about.html"), name="about"),

benchmarks/django_simple/config/wsgi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
1515
"""
1616
import os
17-
import sys
1817
from pathlib import Path
18+
import sys
1919

2020
from django.core.wsgi import get_wsgi_application
2121

22+
2223
# This allows easy placement of apps within the interior
2324
# ddtrace_django directory.
2425
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent
@@ -40,4 +41,4 @@
4041

4142
# Enable only profiler to be used without ddtrace-run
4243
if os.getenv("BENCHMARK_PROFILING_ENABLED", False) is not False:
43-
import ddtrace.profiling.auto
44+
import ddtrace.profiling.auto # noqa

benchmarks/django_simple/ddtrace_django/contrib/sites/migrations/0001_initial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import django.contrib.sites.models
22
from django.contrib.sites.models import _simple_domain_name_validator
3-
from django.db import migrations, models
3+
from django.db import migrations
4+
from django.db import models
45

56

67
class Migration(migrations.Migration):

benchmarks/django_simple/ddtrace_django/contrib/sites/migrations/0002_alter_domain_unique.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import django.contrib.sites.models
2-
from django.db import migrations, models
2+
from django.db import migrations
3+
from django.db import models
34

45

56
class Migration(migrations.Migration):

benchmarks/django_simple/ddtrace_django/users/admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
from ddtrace_django.users.forms import UserChangeForm
2+
from ddtrace_django.users.forms import UserCreationForm
13
from django.contrib import admin
24
from django.contrib.auth import admin as auth_admin
35
from django.contrib.auth import get_user_model
46
from django.utils.translation import gettext_lazy as _
57

6-
from ddtrace_django.users.forms import UserChangeForm, UserCreationForm
78

89
User = get_user_model()
910

benchmarks/django_simple/ddtrace_django/users/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from django.contrib.auth import get_user_model
33
from django.utils.translation import gettext_lazy as _
44

5+
56
User = get_user_model()
67

78

benchmarks/django_simple/ddtrace_django/users/migrations/0001_initial.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import django.contrib.auth.models
22
import django.contrib.auth.validators
3-
from django.db import migrations, models
3+
from django.db import migrations
4+
from django.db import models
45
import django.utils.timezone
56

67

@@ -63,7 +64,10 @@ class Migration(migrations.Migration):
6364
"is_active",
6465
models.BooleanField(
6566
default=True,
66-
help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
67+
help_text=(
68+
"Designates whether this user should be treated as active."
69+
" Unselect this instead of deleting accounts."
70+
),
6771
verbose_name="active",
6872
),
6973
),
@@ -79,7 +83,10 @@ class Migration(migrations.Migration):
7983
"groups",
8084
models.ManyToManyField(
8185
blank=True,
82-
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
86+
help_text=(
87+
"The groups this user belongs to."
88+
" A user will get all permissions granted to each of their groups."
89+
),
8390
related_name="user_set",
8491
related_query_name="user",
8592
to="auth.Group",

benchmarks/django_simple/ddtrace_django/users/urls.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1+
from ddtrace_django.users.views import user_detail_view
2+
from ddtrace_django.users.views import user_redirect_view
3+
from ddtrace_django.users.views import user_update_view
14
from django.urls import path
25

3-
from ddtrace_django.users.views import (
4-
user_detail_view,
5-
user_redirect_view,
6-
user_update_view,
7-
)
86

97
app_name = "users"
108
urlpatterns = [

0 commit comments

Comments
 (0)