mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 22:46:01 -03:30
move code linting to a stricter pep8-esque auto-formatting tool, black
This commit is contained in:
@@ -6,12 +6,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 = '''
|
||||
---
|
||||
@@ -80,11 +79,15 @@ def main():
|
||||
organization_id = module.resolve_name_to_id('organizations', organization)
|
||||
|
||||
# Attempt to look up an existing item based on the provided data
|
||||
existing_item = module.get_one('labels', name_or_id=name, **{
|
||||
'data': {
|
||||
'organization': organization_id,
|
||||
existing_item = module.get_one(
|
||||
'labels',
|
||||
name_or_id=name,
|
||||
**{
|
||||
'data': {
|
||||
'organization': organization_id,
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
# Create the data that gets sent for create and update
|
||||
new_fields = {}
|
||||
@@ -92,12 +95,7 @@ def main():
|
||||
if organization:
|
||||
new_fields['organization'] = organization_id
|
||||
|
||||
module.create_or_update_if_needed(
|
||||
existing_item, new_fields,
|
||||
endpoint='labels', item_type='label',
|
||||
associations={
|
||||
}
|
||||
)
|
||||
module.create_or_update_if_needed(existing_item, new_fields, endpoint='labels', item_type='label', associations={})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user