mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 18:21:03 -03:30
move code linting to a stricter pep8-esque auto-formatting tool, black
This commit is contained in:
@@ -5,12 +5,11 @@
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||
'status': ['preview'],
|
||||
'supported_by': 'community'}
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'}
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
@@ -87,21 +86,14 @@ def main():
|
||||
org_id = module.resolve_name_to_id('organizations', organization)
|
||||
|
||||
# Attempt to look up team based on the provided name and org ID
|
||||
team = module.get_one('teams', name_or_id=name, **{
|
||||
'data': {
|
||||
'organization': org_id
|
||||
}
|
||||
})
|
||||
team = module.get_one('teams', name_or_id=name, **{'data': {'organization': org_id}})
|
||||
|
||||
if state == 'absent':
|
||||
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
||||
module.delete_if_needed(team)
|
||||
|
||||
# Create the data that gets sent for create and update
|
||||
team_fields = {
|
||||
'name': new_name if new_name else (module.get_item_name(team) if team else name),
|
||||
'organization': org_id
|
||||
}
|
||||
team_fields = {'name': new_name if new_name else (module.get_item_name(team) if team else name), 'organization': org_id}
|
||||
if description is not None:
|
||||
team_fields['description'] = description
|
||||
|
||||
|
||||
Reference in New Issue
Block a user