build: update to ruff 0.3.0

This commit is contained in:
Enno Hermann 2024-03-06 13:40:56 +01:00
parent 39149ef564
commit 1961687a18
5 changed files with 7 additions and 8 deletions

View File

@ -13,7 +13,7 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
rev: v0.3.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

View File

@ -48,7 +48,7 @@ style: ## update code style.
black ${target_dirs}
lint: ## run linters.
ruff ${target_dirs}
ruff check ${target_dirs}
black ${target_dirs} --check
system-deps: ## install linux system deps

View File

@ -9,7 +9,7 @@ requires = [
[tool.ruff]
line-length = 120
extend-select = [
lint.extend-select = [
"B033", # duplicate-value
"C416", # unnecessary-comprehension
"D419", # empty-docstring
@ -30,7 +30,7 @@ extend-select = [
"W291", # trailing-whitespace
]
ignore = [
lint.ignore = [
"E501", # line too long
"E722", # bare except (TODO: fix these)
"E731", # don't use lambdas
@ -47,12 +47,12 @@ ignore = [
"PLW0603", # TODO: enable
]
[tool.ruff.pylint]
[tool.ruff.lint.pylint]
max-args = 5
max-public-methods = 20
max-returns = 7
[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = [
"F401", # init files may have "unused" imports for now
"F403", # init files may have star imports for now

View File

@ -1,4 +1,4 @@
black
coverage
nose2
ruff==0.1.3
ruff==0.3.0

View File

@ -64,7 +64,6 @@ class TestVits(unittest.TestCase):
def test_dataset(self):
"""TODO:"""
...
def test_init_multispeaker(self):
num_speakers = 10