mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-03-07 10:05:18 +01:00
Fix deprecated imports in plugins/callback/cgroup_perf_recap.py
Replace deprecated module_utils imports: - ansible.module_utils._text -> ansible.module_utils.common.text.converters - ansible.module_utils.six.with_metaclass -> Python 3 metaclass syntax Fixes #686 Co-authored-by: Cursor AI Signed-off-by: Pavel Bar <pbar@redhat.com>
This commit is contained in:
parent
b6198df6ab
commit
c669351777
2 changed files with 2 additions and 4 deletions
|
|
@ -141,8 +141,7 @@ from abc import ABCMeta, abstractmethod
|
|||
|
||||
from functools import partial
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible.module_utils.six import with_metaclass
|
||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder
|
||||
from ansible.plugins.callback import CallbackBase
|
||||
|
||||
|
|
@ -158,7 +157,7 @@ def dict_fromkeys(keys, default=None):
|
|||
return d
|
||||
|
||||
|
||||
class BaseProf(with_metaclass(ABCMeta, threading.Thread)):
|
||||
class BaseProf(threading.Thread, metaclass=ABCMeta):
|
||||
def __init__(self, path, obj=None, writer=None):
|
||||
threading.Thread.__init__(self) # pylint: disable=non-parent-init-called
|
||||
self.obj = obj
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
tests/utils/shippable/timing.py shebang
|
||||
plugins/callback/cgroup_perf_recap.py pylint:ansible-bad-import-from
|
||||
plugins/modules/sysctl.py pylint:ansible-bad-import-from
|
||||
plugins/shell/csh.py pylint:ansible-bad-import-from
|
||||
plugins/shell/fish.py pylint:ansible-bad-import-from
|
||||
|
|
|
|||
Loading…
Reference in a new issue