mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
Apply new rules from black update (#16232)
This commit is contained in:
@@ -5,7 +5,6 @@ import requests
|
||||
from awxkit import exceptions as exc
|
||||
from awxkit.config import config
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ from contextlib import suppress
|
||||
|
||||
import awxkit.exceptions as exc
|
||||
|
||||
|
||||
notification_endpoints = ("notification_templates", "notification_templates_started", "notification_templates_error", "notification_templates_success")
|
||||
wfjt_notification_endpoints = notification_endpoints + ('notification_templates_approvals',)
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ from awxkit.api.pages import Page
|
||||
from awxkit.config import config
|
||||
import awxkit.exceptions as exc
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ from .page import exception_from_status_code
|
||||
|
||||
from urllib.parse import urljoin
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ from awxkit.utils import random_title, PseudoNamespace, filter_by_class
|
||||
from . import base
|
||||
from . import page
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import awxkit.exceptions as exc
|
||||
from . import base
|
||||
from . import page
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ from awxkit.utils import not_provided, random_title, PseudoNamespace
|
||||
from . import base
|
||||
from . import page
|
||||
|
||||
|
||||
job_results = ('any', 'error', 'success')
|
||||
notification_types = ('awssns', 'email', 'irc', 'pagerduty', 'slack', 'twilio', 'webhook', 'mattermost', 'grafana', 'rocketchat')
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ from awxkit.api.resources import resources
|
||||
from awxkit.config import config
|
||||
import awxkit.exceptions as exc
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from awxkit.api.resources import resources
|
||||
from . import base
|
||||
from . import page
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import logging
|
||||
import re
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
descRE = re.compile(r'^[*] `(\w+)`: [^(]*\((\w+), ([^)]+)\)')
|
||||
|
||||
@@ -17,9 +17,7 @@ def upload_inventory(ansible_runner, nhosts=10, ini=False):
|
||||
copy_content = '''#!/bin/bash
|
||||
cat <<EOF
|
||||
%s
|
||||
EOF''' % json_inventory(
|
||||
nhosts
|
||||
)
|
||||
EOF''' % json_inventory(nhosts)
|
||||
|
||||
# Copy script to test system
|
||||
contacted = ansible_runner.copy(dest=copy_dest, force=True, mode=copy_mode, content=copy_content)
|
||||
|
||||
@@ -3,7 +3,6 @@ from contextlib import contextmanager, suppress
|
||||
from awxkit import api, exceptions
|
||||
from awxkit.config import config
|
||||
|
||||
|
||||
__all__ = ('as_user', 'check_related', 'delete_all', 'uses_sessions')
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ from awxkit.utils import to_str
|
||||
from awxkit.exceptions import Unauthorized, Common
|
||||
from awxkit.cli.utils import cprint
|
||||
|
||||
|
||||
# you'll only see these warnings if you've explicitly *disabled* SSL
|
||||
# verification, so they're a little annoying, redundant
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
@@ -15,7 +15,6 @@ from awxkit import api, config, utils, exceptions, WSClient # noqa
|
||||
from awxkit.cli.utils import HelpfulArgumentParser, cprint, disable_color, colored
|
||||
from awxkit.awx.utils import uses_sessions # noqa
|
||||
|
||||
|
||||
__version__ = _get_version('awxkit')
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ from .custom import CustomAction
|
||||
from .format import add_output_formatting_arguments, strtobool
|
||||
from .resource import DEPRECATED_RESOURCES_REVERSE
|
||||
|
||||
|
||||
UNIQUENESS_RULES = {
|
||||
'me': ('id', 'username'),
|
||||
'users': ('id', 'username'),
|
||||
|
||||
@@ -8,7 +8,6 @@ from awxkit.api.pages.api import EXPORTABLE_RESOURCES
|
||||
from awxkit.cli.format import format_response, add_formatting_import_export
|
||||
from awxkit.cli.utils import CustomRegistryMeta
|
||||
|
||||
|
||||
CONTROL_RESOURCES = ['ping', 'config', 'me', 'metrics', 'mesh_visualizer']
|
||||
|
||||
DEPRECATED_RESOURCES = {
|
||||
|
||||
@@ -10,7 +10,6 @@ from urllib.parse import urlparse
|
||||
|
||||
from awxkit.config import config
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import yaml
|
||||
import glob
|
||||
import logging
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -56,12 +56,10 @@ def test_yaml_import():
|
||||
def _dummy_authenticate():
|
||||
pass
|
||||
|
||||
yaml_fd = io.StringIO(
|
||||
"""
|
||||
yaml_fd = io.StringIO("""
|
||||
workflow_job_templates:
|
||||
- name: Workflow1
|
||||
"""
|
||||
)
|
||||
""")
|
||||
yaml_fd.name = 'file.yaml'
|
||||
cli = CLI(stdin=yaml_fd)
|
||||
cli.parse_args(['--conf.format', 'yaml'])
|
||||
|
||||
Reference in New Issue
Block a user