mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 19:26:58 +00:00
Reformat everything.
This commit is contained in:
parent
3f2213791a
commit
340ff8586d
1008 changed files with 61301 additions and 58309 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# Copyright (c) Ansible project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
|
@ -14,7 +13,7 @@ from ansible_collections.community.general.plugins.module_utils import csv
|
|||
|
||||
VALID_CSV = [
|
||||
(
|
||||
'excel',
|
||||
"excel",
|
||||
{},
|
||||
None,
|
||||
"id,name,role\n1,foo,bar\n2,bar,baz",
|
||||
|
|
@ -29,10 +28,10 @@ VALID_CSV = [
|
|||
"name": "bar",
|
||||
"role": "baz",
|
||||
},
|
||||
]
|
||||
],
|
||||
),
|
||||
(
|
||||
'excel',
|
||||
"excel",
|
||||
{"skipinitialspace": True},
|
||||
None,
|
||||
"id,name,role\n1, foo, bar\n2, bar, baz",
|
||||
|
|
@ -47,11 +46,11 @@ VALID_CSV = [
|
|||
"name": "bar",
|
||||
"role": "baz",
|
||||
},
|
||||
]
|
||||
],
|
||||
),
|
||||
(
|
||||
'excel',
|
||||
{"delimiter": '|'},
|
||||
"excel",
|
||||
{"delimiter": "|"},
|
||||
None,
|
||||
"id|name|role\n1|foo|bar\n2|bar|baz",
|
||||
[
|
||||
|
|
@ -65,10 +64,10 @@ VALID_CSV = [
|
|||
"name": "bar",
|
||||
"role": "baz",
|
||||
},
|
||||
]
|
||||
],
|
||||
),
|
||||
(
|
||||
'unix',
|
||||
"unix",
|
||||
{},
|
||||
None,
|
||||
"id,name,role\n1,foo,bar\n2,bar,baz",
|
||||
|
|
@ -83,12 +82,12 @@ VALID_CSV = [
|
|||
"name": "bar",
|
||||
"role": "baz",
|
||||
},
|
||||
]
|
||||
],
|
||||
),
|
||||
(
|
||||
'excel',
|
||||
"excel",
|
||||
{},
|
||||
['id', 'name', 'role'],
|
||||
["id", "name", "role"],
|
||||
"1,foo,bar\n2,bar,baz",
|
||||
[
|
||||
{
|
||||
|
|
@ -101,14 +100,14 @@ VALID_CSV = [
|
|||
"name": "bar",
|
||||
"role": "baz",
|
||||
},
|
||||
]
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
INVALID_CSV = [
|
||||
(
|
||||
'excel',
|
||||
{'strict': True},
|
||||
"excel",
|
||||
{"strict": True},
|
||||
None,
|
||||
'id,name,role\n1,"f"oo",bar\n2,bar,baz',
|
||||
),
|
||||
|
|
@ -116,7 +115,7 @@ INVALID_CSV = [
|
|||
|
||||
INVALID_DIALECT: list[tuple[str, t.Any, t.Any, str]] = [
|
||||
(
|
||||
'invalid',
|
||||
"invalid",
|
||||
{},
|
||||
None,
|
||||
"id,name,role\n1,foo,bar\n2,bar,baz",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue