mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Remove unnecessary imports by deleting NOQA markers
This commit is contained in:
@@ -248,7 +248,7 @@ class APIView(views.APIView):
|
|||||||
response['X-API-Query-Time'] = '%0.3fs' % sum(q_times)
|
response['X-API-Query-Time'] = '%0.3fs' % sum(q_times)
|
||||||
|
|
||||||
if getattr(self, 'deprecated', False):
|
if getattr(self, 'deprecated', False):
|
||||||
response['Warning'] = '299 awx "This resource has been deprecated and will be removed in a future release."' # noqa
|
response['Warning'] = '299 awx "This resource has been deprecated and will be removed in a future release."'
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ from awx.api.views import (
|
|||||||
InstanceUnifiedJobsList,
|
InstanceUnifiedJobsList,
|
||||||
InstanceInstanceGroupsList,
|
InstanceInstanceGroupsList,
|
||||||
InstanceHealthCheck,
|
InstanceHealthCheck,
|
||||||
InstanceInstallBundle,
|
|
||||||
InstancePeersList,
|
InstancePeersList,
|
||||||
)
|
)
|
||||||
|
from awx.api.views.instance_install_bundle import InstanceInstallBundle
|
||||||
|
|
||||||
|
|
||||||
urls = [
|
urls = [
|
||||||
|
|||||||
@@ -3,26 +3,28 @@
|
|||||||
|
|
||||||
from django.urls import re_path
|
from django.urls import re_path
|
||||||
|
|
||||||
from awx.api.views import (
|
from awx.api.views.inventory import (
|
||||||
InventoryList,
|
InventoryList,
|
||||||
InventoryDetail,
|
InventoryDetail,
|
||||||
InventoryHostsList,
|
|
||||||
InventoryGroupsList,
|
|
||||||
InventoryRootGroupsList,
|
|
||||||
InventoryVariableData,
|
|
||||||
InventoryScriptView,
|
|
||||||
InventoryTreeView,
|
|
||||||
InventoryInventorySourcesList,
|
|
||||||
InventoryInventorySourcesUpdate,
|
|
||||||
InventoryActivityStreamList,
|
InventoryActivityStreamList,
|
||||||
InventoryJobTemplateList,
|
InventoryJobTemplateList,
|
||||||
InventoryAdHocCommandsList,
|
|
||||||
InventoryAccessList,
|
InventoryAccessList,
|
||||||
InventoryObjectRolesList,
|
InventoryObjectRolesList,
|
||||||
InventoryInstanceGroupsList,
|
InventoryInstanceGroupsList,
|
||||||
InventoryLabelList,
|
InventoryLabelList,
|
||||||
InventoryCopy,
|
InventoryCopy,
|
||||||
)
|
)
|
||||||
|
from awx.api.views import (
|
||||||
|
InventoryHostsList,
|
||||||
|
InventoryGroupsList,
|
||||||
|
InventoryInventorySourcesList,
|
||||||
|
InventoryInventorySourcesUpdate,
|
||||||
|
InventoryAdHocCommandsList,
|
||||||
|
InventoryRootGroupsList,
|
||||||
|
InventoryScriptView,
|
||||||
|
InventoryTreeView,
|
||||||
|
InventoryVariableData,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
urls = [
|
urls = [
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
from django.urls import re_path
|
from django.urls import re_path
|
||||||
|
|
||||||
|
from awx.api.views.inventory import (
|
||||||
|
InventoryUpdateEventsList,
|
||||||
|
)
|
||||||
from awx.api.views import (
|
from awx.api.views import (
|
||||||
InventoryUpdateList,
|
InventoryUpdateList,
|
||||||
InventoryUpdateDetail,
|
InventoryUpdateDetail,
|
||||||
@@ -10,7 +13,6 @@ from awx.api.views import (
|
|||||||
InventoryUpdateStdout,
|
InventoryUpdateStdout,
|
||||||
InventoryUpdateNotificationsList,
|
InventoryUpdateNotificationsList,
|
||||||
InventoryUpdateCredentialsList,
|
InventoryUpdateCredentialsList,
|
||||||
InventoryUpdateEventsList,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from oauthlib import oauth2
|
|||||||
from oauth2_provider import views
|
from oauth2_provider import views
|
||||||
|
|
||||||
from awx.main.models import RefreshToken
|
from awx.main.models import RefreshToken
|
||||||
from awx.api.views import ApiOAuthAuthorizationRootView
|
from awx.api.views.root import ApiOAuthAuthorizationRootView
|
||||||
|
|
||||||
|
|
||||||
class TokenView(views.TokenView):
|
class TokenView(views.TokenView):
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from django.urls import re_path
|
from django.urls import re_path
|
||||||
|
|
||||||
from awx.api.views import (
|
from awx.api.views.organization import (
|
||||||
OrganizationList,
|
OrganizationList,
|
||||||
OrganizationDetail,
|
OrganizationDetail,
|
||||||
OrganizationUsersList,
|
OrganizationUsersList,
|
||||||
@@ -14,7 +14,6 @@ from awx.api.views import (
|
|||||||
OrganizationJobTemplatesList,
|
OrganizationJobTemplatesList,
|
||||||
OrganizationWorkflowJobTemplatesList,
|
OrganizationWorkflowJobTemplatesList,
|
||||||
OrganizationTeamsList,
|
OrganizationTeamsList,
|
||||||
OrganizationCredentialList,
|
|
||||||
OrganizationActivityStreamList,
|
OrganizationActivityStreamList,
|
||||||
OrganizationNotificationTemplatesList,
|
OrganizationNotificationTemplatesList,
|
||||||
OrganizationNotificationTemplatesErrorList,
|
OrganizationNotificationTemplatesErrorList,
|
||||||
@@ -25,8 +24,8 @@ from awx.api.views import (
|
|||||||
OrganizationGalaxyCredentialsList,
|
OrganizationGalaxyCredentialsList,
|
||||||
OrganizationObjectRolesList,
|
OrganizationObjectRolesList,
|
||||||
OrganizationAccessList,
|
OrganizationAccessList,
|
||||||
OrganizationApplicationList,
|
|
||||||
)
|
)
|
||||||
|
from awx.api.views import OrganizationCredentialList, OrganizationApplicationList
|
||||||
|
|
||||||
|
|
||||||
urls = [
|
urls = [
|
||||||
|
|||||||
@@ -6,13 +6,15 @@ from django.urls import include, re_path
|
|||||||
|
|
||||||
from awx import MODE
|
from awx import MODE
|
||||||
from awx.api.generics import LoggedLoginView, LoggedLogoutView
|
from awx.api.generics import LoggedLoginView, LoggedLogoutView
|
||||||
from awx.api.views import (
|
from awx.api.views.root import (
|
||||||
ApiRootView,
|
ApiRootView,
|
||||||
ApiV2RootView,
|
ApiV2RootView,
|
||||||
ApiV2PingView,
|
ApiV2PingView,
|
||||||
ApiV2ConfigView,
|
ApiV2ConfigView,
|
||||||
ApiV2SubscriptionView,
|
ApiV2SubscriptionView,
|
||||||
ApiV2AttachView,
|
ApiV2AttachView,
|
||||||
|
)
|
||||||
|
from awx.api.views import (
|
||||||
AuthView,
|
AuthView,
|
||||||
UserMeList,
|
UserMeList,
|
||||||
DashboardView,
|
DashboardView,
|
||||||
@@ -28,8 +30,8 @@ from awx.api.views import (
|
|||||||
OAuth2TokenList,
|
OAuth2TokenList,
|
||||||
ApplicationOAuth2TokenList,
|
ApplicationOAuth2TokenList,
|
||||||
OAuth2ApplicationDetail,
|
OAuth2ApplicationDetail,
|
||||||
MeshVisualizer,
|
|
||||||
)
|
)
|
||||||
|
from awx.api.views.mesh_visualizer import MeshVisualizer
|
||||||
|
|
||||||
from awx.api.views.metrics import MetricsView
|
from awx.api.views.metrics import MetricsView
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from django.urls import re_path
|
from django.urls import re_path
|
||||||
|
|
||||||
from awx.api.views import WebhookKeyView, GithubWebhookReceiver, GitlabWebhookReceiver
|
from awx.api.views.webhooks import WebhookKeyView, GithubWebhookReceiver, GitlabWebhookReceiver
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
|||||||
@@ -122,56 +122,6 @@ from awx.api.views.mixin import (
|
|||||||
UnifiedJobDeletionMixin,
|
UnifiedJobDeletionMixin,
|
||||||
NoTruncateMixin,
|
NoTruncateMixin,
|
||||||
)
|
)
|
||||||
from awx.api.views.instance_install_bundle import InstanceInstallBundle # noqa
|
|
||||||
from awx.api.views.inventory import ( # noqa
|
|
||||||
InventoryList,
|
|
||||||
InventoryDetail,
|
|
||||||
InventoryUpdateEventsList,
|
|
||||||
InventoryList,
|
|
||||||
InventoryDetail,
|
|
||||||
InventoryActivityStreamList,
|
|
||||||
InventoryInstanceGroupsList,
|
|
||||||
InventoryAccessList,
|
|
||||||
InventoryObjectRolesList,
|
|
||||||
InventoryJobTemplateList,
|
|
||||||
InventoryLabelList,
|
|
||||||
InventoryCopy,
|
|
||||||
)
|
|
||||||
from awx.api.views.mesh_visualizer import MeshVisualizer # noqa
|
|
||||||
from awx.api.views.organization import ( # noqa
|
|
||||||
OrganizationList,
|
|
||||||
OrganizationDetail,
|
|
||||||
OrganizationInventoriesList,
|
|
||||||
OrganizationUsersList,
|
|
||||||
OrganizationAdminsList,
|
|
||||||
OrganizationExecutionEnvironmentsList,
|
|
||||||
OrganizationProjectsList,
|
|
||||||
OrganizationJobTemplatesList,
|
|
||||||
OrganizationWorkflowJobTemplatesList,
|
|
||||||
OrganizationTeamsList,
|
|
||||||
OrganizationActivityStreamList,
|
|
||||||
OrganizationNotificationTemplatesList,
|
|
||||||
OrganizationNotificationTemplatesAnyList,
|
|
||||||
OrganizationNotificationTemplatesErrorList,
|
|
||||||
OrganizationNotificationTemplatesStartedList,
|
|
||||||
OrganizationNotificationTemplatesSuccessList,
|
|
||||||
OrganizationNotificationTemplatesApprovalList,
|
|
||||||
OrganizationInstanceGroupsList,
|
|
||||||
OrganizationGalaxyCredentialsList,
|
|
||||||
OrganizationAccessList,
|
|
||||||
OrganizationObjectRolesList,
|
|
||||||
)
|
|
||||||
from awx.api.views.root import ( # noqa
|
|
||||||
ApiRootView,
|
|
||||||
ApiOAuthAuthorizationRootView,
|
|
||||||
ApiVersionRootView,
|
|
||||||
ApiV2RootView,
|
|
||||||
ApiV2PingView,
|
|
||||||
ApiV2ConfigView,
|
|
||||||
ApiV2SubscriptionView,
|
|
||||||
ApiV2AttachView,
|
|
||||||
)
|
|
||||||
from awx.api.views.webhooks import WebhookKeyView, GithubWebhookReceiver, GitlabWebhookReceiver # noqa
|
|
||||||
from awx.api.pagination import UnifiedJobEventPagination
|
from awx.api.pagination import UnifiedJobEventPagination
|
||||||
from awx.main.utils import set_environ
|
from awx.main.utils import set_environ
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ from unittest import mock
|
|||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from awx.api.views import ApiVersionRootView, JobTemplateLabelList, InventoryInventorySourcesUpdate, JobTemplateSurveySpec
|
from awx.api.views.root import ApiVersionRootView
|
||||||
|
from awx.api.views import JobTemplateLabelList, InventoryInventorySourcesUpdate, JobTemplateSurveySpec
|
||||||
|
|
||||||
from awx.main.views import handle_error
|
from awx.main.views import handle_error
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user