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

Bump flake8 additional dependencies #5662

Merged
merged 3 commits into from May 22, 2022
Merged

Bump flake8 additional dependencies #5662

merged 3 commits into from May 22, 2022

Conversation

mkniewallner
Copy link
Member

@mkniewallner mkniewallner commented May 22, 2022

Pull Request Check List

  • Added tests for changed code. Not applicable
  • Updated documentation for changed code. Not applicable

Similarly to python-poetry/poetry-core#362, update flake8 dependencies.

b1a6ef5 updates some assignments to avoid unnecessary map, according to the new C417 rule from flake8-comprehensions.

356766e is a bit more tricky. It updates misuses of lru_cache that prevent class instances from being garbage collected when it is applied on class instances methods.
This is reported by the new B019 rule of flake8-bugbear.
Some resources about this:

Changelogs:

Decorating class instances methods using `lru_cache` prevents garbage collection
to happen when an object gets deleted. This could be really bad for memory
consumption.
Some resources about this:
- https://rednafi.github.io/reflections/dont-wrap-instance-methods-with-functoolslru_cache-decorator-in-python.html
- https://www.youtube.com/watch?v=sVjtp6tGo0g

Originally spotted by rule `B019` of `flake8-bugbear`.
Copy link
Member

@radoering radoering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@radoering radoering merged commit dba8df1 into python-poetry:master May 22, 2022
@mkniewallner mkniewallner deleted the bump-flake8-additional-dependencies branch May 22, 2022 11:29
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants