Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A awesome-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 317
    • Merge requests 317
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Vinta Chen
  • awesome-python
  • Merge requests
  • !2196

Add refurb.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/jdevera/add_refurb into master Oct 03, 2022
  • Overview 3
  • Commits 1
  • Pipelines 1
  • Changes 1

Created by: jdevera

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jdevera/add_refurb