[PR #2196] [CLOSED] Add refurb. #1703

Closed
opened 2025-11-06 13:21:35 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vinta/awesome-python/pull/2196
Author: @jdevera
Created: 10/3/2022
Status: Closed

Base: masterHead: add_refurb


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 README.md (+1 -0)

📄 Description

What is this Python project?

Refurb is a code checker that uses pattern matching on abstract syntax trees to find patterns in the code and suggest improvements that make the code more readable and/or modern.

I started using it, and it suggested I replace:

try:
    something()
except Exception:
    pass

with:

with contextlib.supress(Exception):
    something()

And got me hooked.

What's the difference between this Python project and similar ones?

This project covers the code once it is correct, so it's compatible with other tools such as format checkers, style checkers, linters, type checkers. This will suggest modern approaches to frequently written patterns that are less readable than the suggested alternatives.

I am not aware of other tools in this space.

--

Anyone who agrees with this pull request could submit an Approve review to it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vinta/awesome-python/pull/2196 **Author:** [@jdevera](https://github.com/jdevera) **Created:** 10/3/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `add_refurb` --- ### 📝 Commits (1) - [`e999f34`](https://github.com/vinta/awesome-python/commit/e999f341f6d7c60b97b27b3dbfbf1ab6c3eeb381) Add refurb. ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) </details> ### 📄 Description ## What is this Python project? [Refurb](https://github.com/dosisod/refurb/) is a code checker that uses pattern matching on abstract syntax trees to find patterns in the code and suggest improvements that make the code more readable and/or modern. I started using it, and it suggested I replace: ```python try: something() except Exception: pass ``` with: ```python with contextlib.supress(Exception): something() ``` And got me hooked. ## What's the difference between this Python project and similar ones? This project covers the code once it is correct, so it's compatible with other tools such as format checkers, style checkers, linters, type checkers. This will suggest modern approaches to frequently written patterns that are less readable than the suggested alternatives. I am not aware of other tools in this space. -- Anyone who agrees with this pull request could submit an *Approve* review to it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-06 13:21:35 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-python#1703