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

chore: introduce ruff pre-commit hooks #1855

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slowy07
Copy link
Contributor

@slowy07 slowy07 commented Oct 28, 2024

Description

black is mostly formatter on python projects, but for larger or scaleable, black formatter have some issue specially on runtime and not clearly configureable, introduce ruff formatter, you can check here ruff. you can replace them flake8 into ruff check for more

flake8 and formatter can be configure on pyproject.toml so, its easy to maintain and specfying argument for future project.

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

changes pre-commit configuration

flake8 and black
flake8

ruff formatter
ruff format

@github-actions github-actions bot added the waiting for triage Cannot auto-triage, wait for triage. label Oct 28, 2024
@slowy07 slowy07 changed the title chore: introduce ruff pre-commit hoooks chore: introduce ruff pre-commit hooks Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for triage Cannot auto-triage, wait for triage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant