lint: unify setting in pyproject.toml (#583)

* lint: unify setting in `pyproject.toml`

* apply pre-commit
This commit is contained in:
Jirka Borovec 2024-07-12 08:50:13 +02:00 committed by GitHub
parent 61e3790678
commit a7b6aacc99
7 changed files with 18 additions and 13 deletions

View file

@ -1,7 +0,0 @@
[settings]
line_length = 120
multi_line_output=3
include_trailing_comma = true
ignore_comments = true
profile = black
honor_noqa = true

View file

@ -5,7 +5,7 @@ repos:
hooks:
- id: autoflake
name: autoflake (python)
args: ['--in-place', '--remove-unused-variables', '--remove-all-unused-imports', '--ignore-init-module-imports']
args: ['--in-place']
- repo: https://github.com/pycqa/isort
rev: 5.12.0
@ -18,7 +18,6 @@ repos:
hooks:
- id: black
name: black formatter
args: ['--line-length=120', '--target-version=py37', '--target-version=py38', '--target-version=py39','--target-version=py310']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0

View file

@ -3,7 +3,6 @@ import os
import time
import torch
from vbench import VBench
full_info_path = "eval/vbench/VBench_full_info.json"

View file

@ -3,7 +3,6 @@ import os
import time
import torch
from vbench import VBench
from vbench2_beta_i2v import VBenchI2V

View file

@ -126,7 +126,6 @@ def _read_from_stream(
stream_name: Dict[str, Optional[Union[int, Tuple[int, ...], List[int]]]],
filename: Optional[str] = None,
) -> List["av.frame.Frame"]:
if pts_unit == "sec":
# TODO: we should change all of this from ground up to simply take
# sec and convert to MS in C++

View file

@ -19,7 +19,7 @@ def timestep_transform(
for key in ["height", "width", "num_frames"]:
if model_kwargs[key].dtype == torch.float16:
model_kwargs[key] = model_kwargs[key].float()
t = t / num_timesteps
resolution = model_kwargs["height"] * model_kwargs["width"]
ratio_space = (resolution / base_resolution).sqrt()

16
pyproject.toml Normal file
View file

@ -0,0 +1,16 @@
[tool.autoflake]
remove-unused-variables = true
remove-all-unused-imports = true
ignore-init-module-imports = true
[tool.isort]
line_length = 120
multi_line_output = 3
include_trailing_comma = true
ignore_comments = true
profile = "black"
honor_noqa = true
[tool.black]
line-length = 120
target-version = ["py37", "py38", "py39", "py310"]