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

Infer the length argument of the random.sample function. #1862

Merged
merged 3 commits into from Nov 4, 2022

Conversation

mbyrnepr2
Copy link
Member

Steps

  • For new features or bug fixes, add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

The bug is where the argument is provided as a nodes.Call node instead of a nodes.Const. The fix is to infer it first.

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
📜 Docs

Related Issue

Refs pylint-dev/pylint#7706

@coveralls
Copy link

coveralls commented Nov 3, 2022

Pull Request Test Coverage Report for Build 3392868841

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage remained the same at 92.273%

Files with Coverage Reduction New Missed Lines %
astroid/brain/brain_random.py 1 84.62%
Totals Coverage Status
Change from base Build 3389107769: 0.0%
Covered Lines: 9864
Relevant Lines: 10690

💛 - Coveralls

@mbyrnepr2 mbyrnepr2 marked this pull request as ready for review November 3, 2022 19:24
@mbyrnepr2 mbyrnepr2 added this to the 2.13.0 milestone Nov 3, 2022
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.

LGTM !

@cdce8p cdce8p modified the milestones: 2.13.0, 2.12.13 Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants