mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Validate modules arg spec fixes (#34477)
* Update validate-modules arg_spec introspection to be faster, by only mocking the imports we explicitly list * The use of types.MethodType in redhat_subscription wasn't py3 compatible, use partial instead * Remove argument_spec import hacks, make them errors, we can ignore them with ansible-test * Enable the --arg-spec flag for validate-modules
This commit is contained in:
@@ -231,7 +231,7 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
import tempfile
|
||||
import types
|
||||
import functools
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils._text import to_native
|
||||
@@ -314,7 +314,7 @@ class Rhsm(RegistrationBase):
|
||||
else:
|
||||
return default
|
||||
|
||||
cp.get_option = types.MethodType(get_option_default, cp, configparser.ConfigParser)
|
||||
cp.get_option = functools.partial(get_option_default, cp)
|
||||
|
||||
return cp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user