Skip to content

Add regression tests for inference bug repros #4387

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

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

nelfin
Copy link
Contributor

@nelfin nelfin commented Apr 21, 2021

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in
    doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

Type of Changes

Type
🐛 Bug fix

Related Issue

nelfin added a commit to nelfin/astroid that referenced this pull request Apr 22, 2021
Ref pylint-dev/pylint#4083. Ref pylint-dev/pylint#4387. When used in a
nodes.Subscript, an existing inference_tip was set for Name nodes
matching called type. However, when this name was redefined this led to
false-positive typecheck errors in pylint such as invalid-sequence-index
(see pylint-dev/pylint#4083 and pylint-dev/pylint#4387)
nelfin added a commit to nelfin/astroid that referenced this pull request Apr 22, 2021
Ref pylint-dev/pylint#4083. Ref pylint-dev/pylint#4387. When used in a
nodes.Subscript, an existing inference_tip was set for Name nodes
matching called type. However, when this name was redefined this led to
false-positive typecheck errors in pylint such as invalid-sequence-index
(see pylint-dev/pylint#4083 and pylint-dev/pylint#4387)
nelfin added a commit to nelfin/astroid that referenced this pull request May 2, 2021
Ref pylint-dev/pylint#4083. Ref pylint-dev/pylint#4387. When used in a
nodes.Subscript, an existing inference_tip was set for Name nodes
matching called type. However, when this name was redefined this led to
false-positive typecheck errors in pylint such as invalid-sequence-index
due to the argument being inferred as builtins.type and inference_tip
preventing any further inference.
Pierre-Sassoulas pushed a commit to pylint-dev/astroid that referenced this pull request May 2, 2021
Ref pylint-dev/pylint#4083. Ref pylint-dev/pylint#4387. When used in a
nodes.Subscript, an existing inference_tip was set for Name nodes
matching called type. However, when this name was redefined this led to
false-positive typecheck errors in pylint such as invalid-sequence-index
due to the argument being inferred as builtins.type and inference_tip
preventing any further inference.
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the fix/2.8.x-regression-tests branch from a406b17 to 76dc276 Compare May 6, 2022 08:18
@Pierre-Sassoulas
Copy link
Member

I rebased on the latest main and opened #6521 to merge the commit that is passing right now. It look like the other two are still an issue.

@DanielNoord
Copy link
Collaborator

@Pierre-Sassoulas At what point do we close these stale old PRs?

It might make it easier to do management of the project if we keep only active PRs open?

@DanielNoord DanielNoord added Needs take over 🛎️ Orignal implementer went away but the code could be salvaged. and removed Work in progress labels Mar 30, 2025
@Pierre-Sassoulas
Copy link
Member

True, we can take over even if the PR is closed. I often don't dare to close to not offend the implementer. (My own MR often go stale)

@DanielNoord
Copy link
Collaborator

I have added "Needs take over" to most stale PRs. I think we can craft a friendly message explaining we're doing some clean up and then close most of them :)

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the fix/2.8.x-regression-tests branch from 750a4f8 to 6184c76 Compare March 30, 2025 16:04
@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news 🔇 This change does not require a changelog entry and removed Bug 🪲 Needs take over 🛎️ Orignal implementer went away but the code could be salvaged. labels Mar 30, 2025
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review March 30, 2025 16:04
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Let's merge this regression test before it's fixed, thank you Nelfin :)

@Pierre-Sassoulas Pierre-Sassoulas enabled auto-merge (rebase) March 30, 2025 16:05
Copy link

codecov bot commented Mar 30, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@Pierre-Sassoulas Pierre-Sassoulas merged commit 4847314 into pylint-dev:main Mar 30, 2025
32 of 33 checks passed
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 Skip news 🔇 This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants