mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
pylint plugin to catch due/past-due deprecated calls (#44143)
* Start of work on pylint plugin to catch due/past-due deprecated calls * Improve deprecated pylint plugin * Catch call to AnsibleModule.deprecate also * Skip splatted kwargs, we can't infer that info * Add error for invalid version in deprecation * Skip version if it's a reference to a var * Disable ansible-deprecated-no-version for displaying deprecated module info * fix comments * is None * Force specifying a version, this can be disabled on a per case basis * Disable ansible-deprecated-version by default * Remove to look for 2.8 deprecated * Revert "Remove to look for 2.8 deprecated" This reverts commit 4e84034fd104879f429f0262ff0b2317e3d08deb. * Add script and template used for creating issues for deprecated issues * Fix underscore var
This commit is contained in:
parent
e7926cf9f4
commit
49eb53b44d
5 changed files with 239 additions and 1 deletions
|
@ -315,7 +315,7 @@ class PluginLoader:
|
|||
if alias_name in pull_cache:
|
||||
if not ignore_deprecated and not os.path.islink(pull_cache[alias_name]):
|
||||
# FIXME: this is not always the case, some are just aliases
|
||||
display.deprecated('%s is kept for backwards compatibility but usage is discouraged. '
|
||||
display.deprecated('%s is kept for backwards compatibility but usage is discouraged. ' # pylint: disable=ansible-deprecated-no-version
|
||||
'The module documentation details page may explain more about this rationale.' % name.lstrip('_'))
|
||||
return pull_cache[alias_name]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue