diff --git a/pyproject.toml b/pyproject.toml index ffcb12d7..f663aece 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,10 @@ exclude=["comfy_controlnet_preprocessors", "facerestore"] ignore=[ "E501", # XXX line too long (comments are the big offender right now) "F401", # imported but unused + "E402", # Module level import not at top of file + "A002", # Argument `x` is shadowing a python builtin + "A001", # Variable `x` is shadowing a python builtin + "INP001", # ... is part of an implicit namespace package. Add an `__init__.py`. ] select = [ "A", # flake8-builtins @@ -95,8 +99,8 @@ select = [ "RSE", # flake8-raise "RET", # flake8-return # "SLF", # flake8-self - "SIM", # flake8-simplify - "ARG", # flake8-unused-arguments + # "SIM", # flake8-simplify + # "ARG", # flake8-unused-arguments # "TRY", # tryceratops "RUF100" ] diff --git a/tox.ini b/tox.ini index 3336a699..85467315 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] env_list = format + lint-weak-check tests [coverage:run] @@ -50,12 +51,25 @@ deps = skip_install = true commands = ruff . -[testenv:sortimports] -description = check linting rules +[testenv:lint-weak-check] +description = check only certain few linting rules +deps = + ruff==0.0.261 +skip_install = true +commands = ruff --select COM,I . + +[testenv:lint-weak-fix] +description = fixes only certain few linting rules deps = + black==22.3.0 ruff==0.0.261 skip_install = true -commands = ruff --fix --exclude comfy_horde.py --select I001 . +commands = + black . + ruff --fix --select COM,I . + black . + ruff --fix --select COM,I . + [testenv:comfyui] description = run comfyui