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

Prevent unused-import for six.with_metaclass #7056

Closed

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Jun 25, 2022

Type of Changes

Type
βœ“ πŸ”¨ Refactoring

Description

See pylint-dev/astroid#1622. This change prevents regressing with a false positive unused-import for six.with_metaclass(...) patterns in anticipation of upgrading astroid.

No changelog since there should be no user-facing change (no regression).

Resolves #5935 (actually resolved and tested in pylint-dev/astroid/pull/1622).

@jacobtylerwalls jacobtylerwalls added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news πŸ”‡ This change does not require a changelog entry labels Jun 25, 2022
@jacobtylerwalls jacobtylerwalls added this to the 2.15.0 milestone Jun 25, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2561155549

  • 6 of 8 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 95.314%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pylint/checkers/variables.py 6 8 75.0%
Totals Coverage Status
Change from base Build 2560695451: -0.01%
Covered Lines: 16658
Relevant Lines: 17477

πŸ’› - Coveralls

@jacobtylerwalls
Copy link
Member Author

Needs the next minor version of astroid to actually get the line coverage.

@github-actions
Copy link
Contributor

πŸ€– Effect of this PR on checked open source code: πŸ€–

Effect on pytest:
The following messages are now emitted:

  1. redefined-variable-type:
    Redefinition of importhook type from _distutils_hack.DistutilsMetaFinder to _pytest.assertion.DummyRewriteHook
    https://github.com/pytest-dev/pytest/blob/main/src/_pytest/assertion/__init__.py#L69

Effect on sentry:
The following messages are now emitted:

  1. no-member:
    Instance of 'module' has no 'file' member
    https://github.com/getsentry/sentry/blob/master/src/sentry/utils/distutils/commands/base.py#L37

The following messages are no longer emitted:

  1. unused-import:
    Unused ActorTuple imported from sentry.models
    https://github.com/getsentry/sentry/blob/master/src/sentry/models/projectownership.py#L9

This comment was generated for commit 0bfa1df

@Pierre-Sassoulas Pierre-Sassoulas added the Needs astroid update Needs an astroid update (probably a release too) before being mergable label Jun 26, 2022
@jacobtylerwalls
Copy link
Member Author

Superseded by #7153

@jacobtylerwalls jacobtylerwalls deleted the unused-import branch July 9, 2022 17:40
@Pierre-Sassoulas Pierre-Sassoulas removed this from the 2.15.0 milestone Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Needs astroid update Needs an astroid update (probably a release too) before being mergable Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash argument of type 'Const' is not iterable
3 participants