mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
use flake8 to lint for a few things black doesn't catch
black does *not* warn about missing or extraneous imports, so let's bring back flake8 in our linting to check for them
This commit is contained in:
parent
311c44341e
commit
300f5a3a1f
@ -375,7 +375,7 @@ def events_table(since, full_path, until, **kwargs):
|
||||
|
||||
try:
|
||||
return _copy_table(table='events', query=query("main_jobevent.event_data::json"), path=full_path)
|
||||
except UntranslatableCharacter as exc:
|
||||
except UntranslatableCharacter:
|
||||
return _copy_table(table='events', query=query("replace(main_jobevent.event_data::text, '\\u0000', '')::json"), path=full_path)
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from django.conf import settings
|
||||
from prometheus_client import PROCESS_COLLECTOR, PLATFORM_COLLECTOR, GC_COLLECTOR, CollectorRegistry, Gauge, Info, generate_latest
|
||||
from prometheus_client import CollectorRegistry, Gauge, Info, generate_latest
|
||||
|
||||
from awx.conf.license import get_license
|
||||
from awx.main.utils import get_awx_version
|
||||
|
||||
@ -2,12 +2,8 @@
|
||||
# Python
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# Django
|
||||
from django.db import migrations, models
|
||||
|
||||
# AWX
|
||||
from awx.main.migrations import ActivityStreamDisabledMigration
|
||||
import awx.main.fields
|
||||
|
||||
|
||||
class Migration(ActivityStreamDisabledMigration):
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# AWX
|
||||
from awx.main.migrations import _migration_utils as migration_utils
|
||||
from awx.main.migrations import _credentialtypes as credentialtypes
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
from awx.main.migrations import ActivityStreamDisabledMigration
|
||||
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
# Django
|
||||
from django.db import migrations, models
|
||||
from django.db import migrations
|
||||
|
||||
# AWX
|
||||
from awx.main.migrations import _migration_utils as migration_utils
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Generated by Django 1.11.7 on 2017-12-11 16:40
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
@ -3,8 +3,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import awx.main.fields
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
from django.db import migrations
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
|
||||
@ -2,10 +2,7 @@
|
||||
# Generated by Django 1.11.7 on 2018-02-27 17:58
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import awx.main.fields
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations
|
||||
|
||||
# TODO: Squash all of these migrations with '0024_v330_add_oauth_activity_stream_registrar'
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ from __future__ import unicode_literals
|
||||
# AWX
|
||||
from awx.main.migrations import _credentialtypes as credentialtypes
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
# Generated by Django 1.11.11 on 2018-03-16 20:25
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import awx.main.fields
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
@ -4,9 +4,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import awx.main.fields
|
||||
import awx.main.models.activity_stream
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@ -2,10 +2,7 @@
|
||||
# Generated by Django 1.11.11 on 2018-05-23 20:17
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import awx.main.fields
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
from __future__ import unicode_literals
|
||||
from uuid import uuid4
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.db import migrations
|
||||
from django.utils.timezone import now
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Generated by Django 1.11.20 on 2019-05-06 15:20
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.db import migrations
|
||||
from awx.main.fields import OrderedManyToManyField
|
||||
|
||||
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
import awx
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ import django.db.models.deletion
|
||||
|
||||
from awx.main.migrations._rbac import (
|
||||
rebuild_role_parentage,
|
||||
rebuild_role_hierarchy,
|
||||
migrate_ujt_organization,
|
||||
migrate_ujt_organization_backward,
|
||||
restore_inventory_admins,
|
||||
|
||||
@ -3,15 +3,11 @@
|
||||
import logging
|
||||
|
||||
import awx.main.fields
|
||||
from awx.main.utils.encryption import encrypt_field, decrypt_field
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.utils.timezone import now
|
||||
import django.db.models.deletion
|
||||
|
||||
from awx.main.migrations import _galaxy as galaxy
|
||||
from awx.main.models import CredentialType as ModernCredentialType
|
||||
from awx.main.utils.common import set_current_apps
|
||||
|
||||
logger = logging.getLogger('awx.main.migrations')
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import random
|
||||
import logging
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.utils.timezone import now, timedelta
|
||||
from django.utils.timezone import now
|
||||
|
||||
logger = logging.getLogger('awx.main.migrations')
|
||||
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
import logging
|
||||
|
||||
from uuid import uuid4
|
||||
|
||||
from django.utils.encoding import smart_text
|
||||
from django.utils.timezone import now
|
||||
|
||||
from awx.main.utils.common import set_current_apps
|
||||
from awx.main.utils.common import parse_yaml_or_json
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import collections
|
||||
import time
|
||||
import logging
|
||||
from base64 import b64encode
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ import yaml
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import stat
|
||||
import urllib.parse
|
||||
import threading
|
||||
|
||||
@ -10,7 +10,7 @@ import re
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
# Tower
|
||||
from awx.conf import fields, register
|
||||
from awx.conf import fields
|
||||
|
||||
|
||||
class PendoTrackingStateField(fields.ChoiceField):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user