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

Improve output of consider-using-generator message for min() calls with default keyword #8582

Merged
merged 1 commit into from
Apr 16, 2023

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
🐛 Bug fix

Description

Closes #8563

@jacobtylerwalls jacobtylerwalls added this to the 3.0.0b1 milestone Apr 16, 2023
@codecov
Copy link

codecov bot commented Apr 16, 2023

Codecov Report

Merging #8582 (aec217f) into main (2db55f6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8582   +/-   ##
=======================================
  Coverage   95.91%   95.91%           
=======================================
  Files         174      174           
  Lines       18371    18394   +23     
=======================================
+ Hits        17620    17643   +23     
  Misses        751      751           
Impacted Files Coverage Δ
pylint/checkers/refactoring/refactoring_checker.py 98.34% <100.00%> (+<0.01%) ⬆️

... and 2 files with indirect coverage changes

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, should we backport this kind of bug fixes ?

@github-actions
Copy link
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on django:
The following messages are now emitted:

  1. consider-using-generator:
    Consider using a generator instead 'max((self.lastmod(item) for item in self.items()), default=None)'
    https://github.com/django/django/blob/255f5345904854128647705adcb8d21138e87c63/django/contrib/sitemaps/__init__.py#L162

The following messages are no longer emitted:

  1. consider-using-generator:
    Consider using a generator instead 'max(self.lastmod(item) for item in self.items())'
    https://github.com/django/django/blob/255f5345904854128647705adcb8d21138e87c63/django/contrib/sitemaps/__init__.py#L162

This comment was generated for commit aec217f

@jacobtylerwalls
Copy link
Member Author

LGTM, should we backport this kind of bug fixes ?

Why not.

@jacobtylerwalls jacobtylerwalls modified the milestones: 3.0.0b1, 2.17.3 Apr 16, 2023
@jacobtylerwalls jacobtylerwalls merged commit 4a485e2 into pylint-dev:main Apr 16, 2023
@jacobtylerwalls jacobtylerwalls deleted the default-min-max branch April 16, 2023 17:34
github-actions bot pushed a commit that referenced this pull request Apr 16, 2023
…s with `default` keyword (#8582)

(cherry picked from commit 4a485e2)
Pierre-Sassoulas pushed a commit that referenced this pull request Apr 17, 2023
…s with `default` keyword (#8582) (#8583)

(cherry picked from commit 4a485e2)

Co-authored-by: Jacob Walls <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

consider-using-generator error message ignores default arguments
2 participants