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

Improvements consider-using-tuple #4838

Merged
merged 3 commits into from
Aug 13, 2021
Merged

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Aug 13, 2021

Type of Changes

Type
✨ New feature
🔨 Refactoring

Description

Followup to #4835 (comment)

  • Add additional typing to CodeStyleChecker
  • Limit consider-using-tuple to in-place defined lists to prevent double warnings.
  • Emit consider-using-tuple even for starred expressions as they can be replaced as well.
var = (1, 2, 3)

# old
[*var]

# new
(*var,)  # trailing comma is important

* Limit to in-place defined lists
* Emit even for starred expressions
@cdce8p cdce8p added checker-CodeStyle Issues and PRs that relate to the `CodeStyleChecker` Enhancement ✨ Improvement to a component labels Aug 13, 2021
@cdce8p cdce8p added this to the 2.10.0 milestone Aug 13, 2021
@coveralls
Copy link

coveralls commented Aug 13, 2021

Pull Request Test Coverage Report for Build 1128684152

  • 11 of 11 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 92.649%

Totals Coverage Status
Change from base Build 1128505117: 0.002%
Covered Lines: 13322
Relevant Lines: 14379

💛 - Coveralls

@cdce8p cdce8p marked this pull request as draft August 13, 2021 18:04
@cdce8p cdce8p marked this pull request as ready for review August 13, 2021 18:54
@cdce8p cdce8p merged commit 728d258 into pylint-dev:main Aug 13, 2021
@cdce8p cdce8p deleted the cs_improvements branch August 13, 2021 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checker-CodeStyle Issues and PRs that relate to the `CodeStyleChecker` Enhancement ✨ Improvement to a component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants