VideoTuna icon indicating copy to clipboard operation
VideoTuna copied to clipboard

chore: fix linting

Open samidarko opened this issue 1 year ago • 0 comments

I've been trying to fix the lint error. The first run showed more than 3000 errors.

There are way too many line too long (E501) and too complex functions (C901) so I excluded those rule completely in the pyproject.toml.

More importantly, the errors left are more linked to the code and I'm not feeling comfortable fixing them. I think it would be better if you do it.

Please take a look this missing dependency:

$ poetry run lint | grep videotuna | egrep -v "F841|F821|F811|F405"
videotuna/lvdm/modules/losses/contperceptual.py:4:1: F403 `from taming.modules.losses.vqperceptual import *` used; unable to detect undefined names
120 |         from videotuna.third_party.flux.models.smoldit import (

Next it's important to fix all those rules because it's some programming errors.

Here are the Ruff lint rule names for the specified error codes:

Code Rule Name Description
F841 unused-variable Variable is assigned but never used.
F821 undefined-name Name is used but not defined.
F811 redefined-while-unused Variable is redefined while the original was never used.
F405 undefined-from-import Import * statement used but name is undefined.

These rules belong to the Pyflakes (F) category in Ruff.

samidarko avatar Mar 27 '25 14:03 samidarko