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

Fix missing-kwoa FP with With statements #8101

Merged
merged 5 commits into from
Jan 24, 2023

Conversation

clavedeluna
Copy link
Contributor

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Fix no-kwoa false positive for context managers.

Closes #8100

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.16.0 milestone Jan 23, 2023
@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Jan 23, 2023
@github-actions
Copy link
Contributor

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

Effect on django:
The following messages are now emitted:

  1. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L22
  2. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L172
  3. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/autoreload.py#L274
  4. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/version.py#L87

The following messages are no longer emitted:

  1. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L22
  2. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L172
  3. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/autoreload.py#L274
  4. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/version.py#L87

This comment was generated for commit 169a6a8

@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #8101 (169a6a8) into main (31fe302) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8101   +/-   ##
=======================================
  Coverage   95.46%   95.46%           
=======================================
  Files         176      176           
  Lines       18542    18543    +1     
=======================================
+ Hits        17701    17702    +1     
  Misses        841      841           
Impacted Files Coverage Ξ”
pylint/checkers/typecheck.py 96.24% <100.00%> (ΓΈ)
pylint/checkers/stdlib.py 96.70% <0.00%> (+0.01%) ⬆️

@clavedeluna clavedeluna merged commit 92ec5d2 into pylint-dev:main Jan 24, 2023
clavedeluna added a commit to clavedeluna/pylint that referenced this pull request Jan 24, 2023
<!--
Thank you for submitting a PR to pylint!

To ease the process of reviewing your PR, do make sure to complete the
following boxes.

- [ ] Write a good description on what the PR does.
- [ ] Create a news fragment with `towncrier create
<IssueNumber>.<type>` which will be
included in the changelog. `<type>` can be one of: breaking,
user_action, feature,
new_check, removed_check, extension, false_positive, false_negative,
bugfix, other, internal.
If necessary you can write details or offer examples on how the new
change is supposed to work.
- [ ] If you used multiple emails or multiple names when contributing,
add your mails
      and preferred name in ``script/.contributors_aliases.json``
-->

## Type of Changes

<!-- Leave the corresponding lines for the applicable type of change:
-->

|     | Type                   |
| --- | ---------------------- |
| βœ“   | πŸ› Bug fix          |

## Description

Fix ``no-kwoa`` false positive for context managers.

Closes pylint-dev#8100
clavedeluna added a commit to clavedeluna/pylint that referenced this pull request Jan 24, 2023
<!--
Thank you for submitting a PR to pylint!

To ease the process of reviewing your PR, do make sure to complete the
following boxes.

- [ ] Write a good description on what the PR does.
- [ ] Create a news fragment with `towncrier create
<IssueNumber>.<type>` which will be
included in the changelog. `<type>` can be one of: breaking,
user_action, feature,
new_check, removed_check, extension, false_positive, false_negative,
bugfix, other, internal.
If necessary you can write details or offer examples on how the new
change is supposed to work.
- [ ] If you used multiple emails or multiple names when contributing,
add your mails
      and preferred name in ``script/.contributors_aliases.json``
-->

## Type of Changes

<!-- Leave the corresponding lines for the applicable type of change:
-->

|     | Type                   |
| --- | ---------------------- |
| βœ“   | πŸ› Bug fix          |

## Description

Fix ``no-kwoa`` false positive for context managers.

Closes pylint-dev#8100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Positive 🦟 A message is emitted but nothing is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dict unpacking within a context manager triggers missing-kwoa
3 participants