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()exceptException:pass
with:
withcontextlib.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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/vinta/awesome-python/pull/2196
Author: @jdevera
Created: 10/3/2022
Status: ❌ Closed
Base:
master← Head:add_refurb📝 Commits (1)
e999f34Add refurb.📊 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:
with:
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.