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

[WIP] Replace lambdas with function calls #7441

Closed
wants to merge 3 commits into from
Closed

[WIP] Replace lambdas with function calls #7441

wants to merge 3 commits into from

Conversation

Solomon1732
Copy link
Contributor

@Solomon1732 Solomon1732 commented May 25, 2023

Replace lambdas with function calls. This was done either by extracting a lambda into a function or method, or by replacing it with a library function call.

This PR fixes #7432

Solomon1732 and others added 3 commits June 7, 2023 12:22
Replace lambdas with function calls. This was done either by extracting a lambda into a function or method, or by replacing it with a library function call.
The `u` prefix was removed from strings.

Instead of using the `%` operator with strings or concatenating multiple of them, f-strings were used.

Replaced complex one-like if-else chains with dicts and calls to `dict.get`.

Instead of creating lists and adding them (which returns a new list), a list is created from the get-go by extending it via the star operator during its creation.
Bumps [requests](https://github.com/psf/requests) from 2.25.1 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.25.1...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@Solomon1732
Copy link
Contributor Author

Recent rebasing from upstream messed up my PR commits. Because of this, I'm closing this pull request and opening a new one.

@Solomon1732 Solomon1732 closed this Jun 7, 2023
@Solomon1732 Solomon1732 deleted the f-extract-lambdas-into-functions branch June 7, 2023 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Extract lambdas into functions to improve readability and ease maintenance
2 participants