Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused stdlib imports from module_utils #79905

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/unused-imports-module-utils-stdlib.yml
@@ -0,0 +1,4 @@
minor_changes:
- >
Remove unused Python stdlib imports from module_utils which were not present for backwards compatibility in:
common.file, compat.selectors, facts.network.iscsi, facts.network.nvme, yumdnf
5 changes: 0 additions & 5 deletions lib/ansible/module_utils/common/file.py
Expand Up @@ -4,15 +4,10 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import errno
import os
import stat
import re
import pwd
import grp
import time
import shutil
import traceback
import fcntl
import sys

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/module_utils/compat/selectors.py
Expand Up @@ -35,7 +35,6 @@
# Fix use of OSError exception for py3 and use the wrapper of kqueue.control so retries of
# interrupted syscalls work with kqueue

import os.path
import sys
import types

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/module_utils/facts/network/iscsi.py
Expand Up @@ -19,7 +19,6 @@
__metaclass__ = type

import sys
import subprocess

import ansible.module_utils.compat.typing as t

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/module_utils/facts/network/nvme.py
Expand Up @@ -19,7 +19,6 @@
__metaclass__ = type

import sys
import subprocess

import ansible.module_utils.compat.typing as t

Expand Down
1 change: 0 additions & 1 deletion lib/ansible/module_utils/yumdnf.py
Expand Up @@ -15,7 +15,6 @@
import os
import time
import glob
import tempfile
from abc import ABCMeta, abstractmethod

from ansible.module_utils._text import to_native
Expand Down