Commit ca1a2e90 authored by Hyunsung Lee's avatar Hyunsung Lee Committed by Zhekai Zhang
Browse files

Add linting for python.

parent 92ac7b40
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install ruff yapf
- name: Run ruff check
run: ruff check nunchaku comfyui examples tests --output-format github
- name: Run yapf check
run: yapf --diff nunchaku comfyui examples tests --recursive
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.11.2
hooks:
- id: ruff
args: ["check", "nunchaku", "comfyui", "examples", "tests", "--output-format", "github"]
- repo: https://github.com/google/yapf
rev: v0.43.0
hooks:
- id: yapf
args: ["--diff", "--recursive", "nunchaku", "comfyui", "examples", "tests" ]
...@@ -10,6 +10,13 @@ build-backend = "setuptools.build_meta" ...@@ -10,6 +10,13 @@ build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find] [tool.setuptools.packages.find]
include = ["nunchaku"] include = ["nunchaku"]
[tool.ruff]
line-length = 140
[tool.ruff.lint]
select = ["E", "W"]
ignore = ["F401", "E501"]
[project] [project]
dynamic = ["version"] dynamic = ["version"]
name = "nunchaku" name = "nunchaku"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment