Repository: ansible/awx
File: awx/main/models/__init__.py (Python)

Code before:
# Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.

import json

# Django
from django.conf import settings  # noqa
from django.db import connection
from django.db.models.signals import pre_delete  # noqa

# django-ansible-base
from ansible_base.resource_registry.fields import AnsibleResourceField
from ansible_base.rbac import permission_registry
from ansible_base.rbac.models import RoleDefinition, RoleUserAssignment
from ansible_base.lib.utils.models import prevent_search
from ansible_base.lib.utils.models import user_summary_fields

# AWX
from awx.main.models.base import BaseModel, PrimordialModel, accepts_json, compute_cloud_inventory_sources, VERBOSITY_CHOICES  # noqa
from awx.main.models.unified_jobs import UnifiedJob, UnifiedJobTemplate, StdoutMaxBytesExceeded  # noqa
from awx.main.models.organization import Organization, Profile, Team, UserSessionMembership  # noqa
from awx.main.models.credential import Credential, CredentialType, CredentialInputSource, ManagedCredentialType, build_safe_env  # noqa
from awx.main.models.projects import Project, ProjectUpdate  # noqa
from awx.main.models.receptor_address import ReceptorAddress  # noqa
from awx.main.models.inventory import (  # noqa
    CustomInventoryScript,
    Group,
    Host,
    HostMetric,
    HostMetricSummaryMonthly,
    Inventory,
    InventoryConstructedInventoryMembership,
    InventorySource,
    InventoryUpdate,
    SmartInventoryMembership,
)
from awx.main.models.jobs import (  # noqa
    Job,
    JobHostSummary,
    JobLaunchConfig,
    JobTemplate,
    SystemJob,
    SystemJobTemplate,
)

Review comment (suggestion):
With https://github.com/ansible/awx/pull/15537#discussion_r1786342549, I don't think that there should be a possibility to do `from awx.main.models import compute_cloud_inventory_sources`, because it's not a model.
```suggestion
from awx.main.models.base import BaseModel, PrimordialModel, accepts_json, VERBOSITY_CHOICES  # noqa
```

Code after:
# Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.

import json

# Django
from django.conf import settings  # noqa
from django.db import connection
from django.db.models.signals import pre_delete  # noqa

# django-ansible-base
from ansible_base.resource_registry.fields import AnsibleResourceField
from ansible_base.rbac import permission_registry
from ansible_base.rbac.models import RoleDefinition, RoleUserAssignment
from ansible_base.lib.utils.models import prevent_search
from ansible_base.lib.utils.models import user_summary_fields

# AWX
from awx.main.models.base import BaseModel, PrimordialModel, accepts_json, VERBOSITY_CHOICES  # noqa
from awx.main.models.unified_jobs import UnifiedJob, UnifiedJobTemplate, StdoutMaxBytesExceeded  # noqa
from awx.main.models.organization import Organization, Team, UserSessionMembership  # noqa
from awx.main.models.credential import Credential, CredentialType, CredentialInputSource, ManagedCredentialType, build_safe_env  # noqa
from awx.main.models.projects import Project, ProjectUpdate  # noqa
from awx.main.models.receptor_address import ReceptorAddress  # noqa
from awx.main.models.inventory import (  # noqa
    CustomInventoryScript,
    Group,
    Host,
    HostMetric,
    HostMetricSummaryMonthly,
    Inventory,
    InventoryConstructedInventoryMembership,
    InventorySource,
    InventoryUpdate,
    SmartInventoryMembership,
)
from awx.main.models.jobs import (  # noqa
    Job,
    JobHostSummary,
    JobLaunchConfig,
    JobTemplate,
    SystemJob,
    SystemJobTemplate,
)