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

Add Python 3.8+ asyncSetUp to "defining-attr-methods" list #8403

Merged
merged 1 commit into from
Mar 11, 2023
Merged

Add Python 3.8+ asyncSetUp to "defining-attr-methods" list #8403

merged 1 commit into from
Mar 11, 2023

Conversation

HorlogeSkynet
Copy link
Contributor

@HorlogeSkynet HorlogeSkynet commented Mar 8, 2023

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
βœ“ πŸ“œ Docs

Description

This patch adds unittest.IsolatedAsyncioTestCase asynchronous "setUp" coroutine to the list of "defining-attr-methods", in order to silence "attribute-defined-outside-init" (W0201) false positive.


Feel free to edit this PR as needed; I'm not sure how we should handle Python 3.8+ constraint here.

Thanks, bye πŸ‘‹

@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Mar 8, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.17.1 milestone Mar 8, 2023
@github-actions

This comment has been minimized.

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, thank you !

@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #8403 (f0a1fde) into main (4c56ba8) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head f0a1fde differs from pull request most recent head 61ef33e. Consider uploading reports for the commit 61ef33e to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8403      +/-   ##
==========================================
- Coverage   95.73%   95.73%   -0.01%     
==========================================
  Files         174      174              
  Lines       18395    18392       -3     
==========================================
- Hits        17610    17607       -3     
  Misses        785      785              
Impacted Files Coverage Ξ”
pylint/checkers/classes/class_checker.py 93.63% <ΓΈ> (ΓΈ)

... and 1 file with indirect coverage changes

@HorlogeSkynet
Copy link
Contributor Author

(One check is still failing against Python 3.11, I guess this is unrelated to these changes as you've encountered the same error elsewhere lately)

@Pierre-Sassoulas
Copy link
Member

I don't know why the primer repeatedly fail. Could you try rebasing on upstream main so that the base commit is newer ? It could be that the cache from the common commit between your branch and the main branch is not available anymore.

@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 61ef33e

@Pierre-Sassoulas Pierre-Sassoulas merged commit b312b9a into pylint-dev:main Mar 11, 2023
github-actions bot pushed a commit that referenced this pull request Mar 11, 2023
Pierre-Sassoulas pushed a commit that referenced this pull request Mar 11, 2023
…8438)

(cherry picked from commit b312b9a)

Co-authored-by: Samuel FORESTIER <HorlogeSkynet@users.noreply.github.com>
@HorlogeSkynet HorlogeSkynet deleted the attribute_defined_outside_init/asyncSetUp branch March 12, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported 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.

None yet

2 participants