# Refurb : 파이썬 코드베이스 최신화 도구

> Clean Markdown view of GeekNews topic #7550. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=7550](https://news.hada.io/topic?id=7550)
- GeekNews Markdown: [https://news.hada.io/topic/7550.md](https://news.hada.io/topic/7550.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2022-10-06T10:51:01+09:00
- Updated: 2022-10-06T10:51:01+09:00
- Original source: [github.com/dosisod](https://github.com/dosisod/refurb)
- Points: 10
- Comments: 0

## Topic Body

- 파이썬 코드를 refurbishing & mordernizing 해주는 도구   
- 플러그인을 통해서 자신만의 체크 룰 추가 가능   
- git pre-commit 과 함께 이용 가능   
- 코드 리뷰시에 서로 읽기 좋도록, 코드를 더 우아하고 현대적으로 만들기 위해 개발  
- Rust에 내장된 linter인 clippy 에서 영감을 받음   
```python  
$ refurb main.py  
main.py:3:17 [FURB109]: Use `in (x, y, z)` instead of `in [x, y, z]`  
main.py:4:5 [FURB101]: Use `y = Path(x).read_text()` instead of `with open(x, ...) as f: y = f.read()`  
main.py:10:40 [FURB102]: Replace `x.startswith(y) or x.startswith(z)` with `x.startswith((y, z))`  
main.py:16:9 [FURB105]: Use `print() instead of `print("")`  
```

## Comments



_No public comments on this page._
