Skip to content

Commit

Permalink
Fix sanity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersson007 committed Jan 23, 2024
1 parent 5ed3eaf commit 7fdbd38
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/mysql_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,14 @@ def db_create(cursor, db, encoding, collation):
def main():
argument_spec = mysql_common_argument_spec()
argument_spec.update(
name=dict(type='list', required=True, aliases=['db']),
name=dict(type='list', elements='str', required=True, aliases=['db']),
encoding=dict(type='str', default=''),
collation=dict(type='str', default=''),
target=dict(type='path'),
state=dict(type='str', default='present', choices=['absent', 'dump', 'import', 'present']),
single_transaction=dict(type='bool', default=False),
quick=dict(type='bool', default=True),
ignore_tables=dict(type='list', default=[]),
ignore_tables=dict(type='list', elements='str', default=[]),
hex_blob=dict(default=False, type='bool'),
force=dict(type='bool', default=False),
master_data=dict(type='int', default=0, choices=[0, 1, 2]),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/mysql_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,8 @@ def main():
argument_spec = mysql_common_argument_spec()
argument_spec.update(
login_db=dict(type='str'),
filter=dict(type='list'),
exclude_fields=dict(type='list'),
filter=dict(type='list', elements='str'),
exclude_fields=dict(type='list', elements='str'),
return_empty_dbs=dict(type='bool', default=False),
)

Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/mysql_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- List of values to be passed as positional arguments to the query.
- Mutually exclusive with I(named_args).
type: list
elements: raw
named_args:
description:
- Dictionary of key-value arguments to pass to the query.
Expand Down Expand Up @@ -141,7 +142,7 @@ def main():
argument_spec.update(
query=dict(type='raw', required=True),
login_db=dict(type='str'),
positional_args=dict(type='list'),
positional_args=dict(type='list', elements='raw'),
named_args=dict(type='dict'),
single_transaction=dict(type='bool', default=False),
)
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/mysql_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def setvariable(cursor, mysqlvar, value, mode='global'):
def main():
argument_spec = mysql_common_argument_spec()
argument_spec.update(
variable=dict(type='str'),
variable=dict(type='str', required=True),
value=dict(type='str'),
mode=dict(type='str', choices=['global', 'persist', 'persist_only'], default='global'),
)
Expand Down
4 changes: 0 additions & 4 deletions tests/sanity/ignore-2.16.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
plugins/modules/mysql_db.py validate-modules:doc-elements-mismatch
plugins/modules/mysql_db.py validate-modules:parameter-list-no-elements
plugins/modules/mysql_db.py validate-modules:use-run-command-not-popen
plugins/modules/mysql_info.py validate-modules:doc-elements-mismatch
plugins/modules/mysql_info.py validate-modules:parameter-list-no-elements
plugins/modules/mysql_query.py validate-modules:parameter-list-no-elements
plugins/modules/mysql_user.py validate-modules:undocumented-parameter
plugins/modules/mysql_variables.py validate-modules:doc-required-mismatch
plugins/module_utils/mysql.py pylint:unused-import
plugins/module_utils/version.py pylint:unused-import

0 comments on commit 7fdbd38

Please sign in to comment.