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

Mention that unused-import skips __init__.py files #10179

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

amelenty
Copy link
Contributor

  • Explained why init.py files may have unused imports by design.
  • Linked to the config option that overrides this behavior

Type of Changes

Type
βœ“ πŸ“œ Docs

Description

Closes #10162

- Explained why __init__.py files may have unused imports by design.
- Linked to the config option that overrides this behavior

Fixes pylint-dev#10162
@Pierre-Sassoulas Pierre-Sassoulas added Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry labels Jan 12, 2025
@@ -0,0 +1 @@
- `The --init-import configuration option <https://pylint.readthedocs.io/en/latest/user_guide/configuration/all-options.html#init-import>`_
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this an internal link instead of linking the actual URL of the file? There are many examples in the docs on how to make those.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done πŸ‘

@DanielNoord DanielNoord enabled auto-merge (squash) January 13, 2025 07:35
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 95.83%. Comparing base (d94194b) to head (611e23c).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #10179   +/-   ##
=======================================
  Coverage   95.83%   95.83%           
=======================================
  Files         174      174           
  Lines       19002    19002           
=======================================
  Hits        18211    18211           
  Misses        791      791           

@DanielNoord DanielNoord merged commit 909a883 into pylint-dev:main Jan 13, 2025
26 checks passed
@amelenty amelenty deleted the doc-unused-import-init branch January 13, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No warning for unused import in __init__.py
3 participants