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

change linter and formatter to ruff #176

Merged
merged 5 commits into from
Nov 3, 2023
Merged

Conversation

CunliangGeng
Copy link
Member

@CunliangGeng CunliangGeng commented Nov 2, 2023

Due to the broken change of python extension in vscode, we have to reset linter and formatter used in this project.

Ruff is both a linter and formatter, providing an all-in-one solutions with surprising performance(see here1 and here2). So Ruff is used to replace yapf, isort and prospector used before.

Major changes

  • replace linter and formatter with ruff
  • autofix linting violiations using ruff
  • format code using ruff

⚠️ Note that developers have to reset their dev env by installing ruff and updating vscode extensions.

- Replace `prospector`, `isort` and `yapf` with all-in-one tool `ruff`
- Update settings and configrations
- Update README
- Update github actions
`ruff check --fix --unsafe-fixes .`
run command `ruff format .`
@CunliangGeng CunliangGeng requested a review from gcroci2 November 2, 2023 15:20
Copy link
Contributor

@gcroci2 gcroci2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, very handy change! I want to use ruff in deeprank2 as well :-)

pyproject.toml Show resolved Hide resolved
@CunliangGeng CunliangGeng merged commit 19f5c0a into dev Nov 3, 2023
2 of 5 checks passed
@CunliangGeng CunliangGeng deleted the change_linter_formatter branch November 3, 2023 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants