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 imports from the stdlib #120417

Closed
vstinner opened this issue Jun 12, 2024 · 8 comments
Closed

Remove unused imports from the stdlib #120417

vstinner opened this issue Jun 12, 2024 · 8 comments

Comments

vstinner added a commit to vstinner/cpython that referenced this issue Jun 12, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Jun 12, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Jun 12, 2024
Tools such as ruff can ignore 'imported but unused' warnings if a
line ends with "# noqa". It prevents the temptation to remove an
import which is used effectively.
vstinner added a commit to vstinner/cpython that referenced this issue Jun 12, 2024
Tools such as ruff can ignore 'imported but unused' warnings if a
line ends with "# noqa". It prevents the temptation to remove an
import which is used effectively.
vstinner added a commit to vstinner/cpython that referenced this issue Jun 12, 2024
Tools such as ruff can ignore 'imported but unused' warnings if a
line ends with "# noqa". It prevents the temptation to remove an
import which is used effectively.
vstinner added a commit to vstinner/cpython that referenced this issue Jun 12, 2024
Tools such as ruff can ignore "imported but unused" warnings if a
line ends with "# noqa". It avoids the temptation to remove an import
which is used effectively.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 12, 2024
(cherry picked from commit 4c6d4f5)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this issue Jun 12, 2024
…20429)

gh-120417: Remove unused imports in the stdlib (GH-120420)
(cherry picked from commit 4c6d4f5)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this issue Jun 13, 2024
Tools such as ruff can ignore "imported but unused" warnings if a
line ends with "# noqa: F401". It avoids the temptation to remove
an import which is used effectively.
vstinner added a commit to vstinner/cpython that referenced this issue Jun 13, 2024
Tools such as ruff can ignore "imported but unused" warnings if a
line ends with "# noqa: F401". It avoids the temptation to remove
an import which is used effectively.
vstinner added a commit to vstinner/cpython that referenced this issue Jun 13, 2024
Add __all__ to the following modules: collections.abc,
importlib.machinery, importlib.util and xml.sax.

Add also "# noqa: F401" in subprocess and xml.sax on two lines.
vstinner added a commit that referenced this issue Jun 14, 2024
Add __all__ to the following modules:
importlib.machinery, importlib.util and xml.sax.

Add also "# noqa: F401" in collections.abc,
subprocess and xml.sax.

* Sort __all__; remove collections.abc.__all__; remove private names

* Add tests
terryjreedy added a commit to terryjreedy/cpython that referenced this issue Jun 16, 2024
)

(cherry picked from commit 4c6d4f5)

Co-authored-by: Victor Stinner vstinner@python.org
terryjreedy added a commit that referenced this issue Jun 16, 2024
(cherry picked from commit 4c6d4f5)

Co-authored-by: Victor Stinner vstinner@python.org
@terryjreedy
Copy link
Member

Victor, can this be closed?

@vstinner
Copy link
Member Author

Please keep it open. I would like to visit some options for ssl and ctypes. And check imports in tests.

vstinner added a commit to vstinner/cpython that referenced this issue Jun 17, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Jun 17, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Jun 17, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Jun 17, 2024
Ignore linter "imported but unused" warnings in tests when the linter
doesn't understand why the import is important.
mrahtz pushed a commit to mrahtz/cpython that referenced this issue Jun 30, 2024
mrahtz pushed a commit to mrahtz/cpython that referenced this issue Jun 30, 2024
mrahtz pushed a commit to mrahtz/cpython that referenced this issue Jun 30, 2024
Ignore linter "imported but unused" warnings in tests when the linter
doesn't understand how the import is used.
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
Tools such as ruff can ignore "imported but unused" warnings if a
line ends with "# noqa: F401". It avoids the temptation to remove
an import which is used effectively.
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
…0461)

Add __all__ to the following modules:
importlib.machinery, importlib.util and xml.sax.

Add also "# noqa: F401" in collections.abc,
subprocess and xml.sax.

* Sort __all__; remove collections.abc.__all__; remove private names

* Add tests
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
Run test_module_for_bdb with a specific namespace.
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
Ignore linter "imported but unused" warnings in tests when the linter
doesn't understand how the import is used.
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Tools such as ruff can ignore "imported but unused" warnings if a
line ends with "# noqa: F401". It avoids the temptation to remove
an import which is used effectively.
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
…0461)

Add __all__ to the following modules:
importlib.machinery, importlib.util and xml.sax.

Add also "# noqa: F401" in collections.abc,
subprocess and xml.sax.

* Sort __all__; remove collections.abc.__all__; remove private names

* Add tests
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Run test_module_for_bdb with a specific namespace.
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Ignore linter "imported but unused" warnings in tests when the linter
doesn't understand how the import is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants