Skip to content

Commit

Permalink
Fix CI: ignore C901 ("<some_func> is to complex") in ruff (huggingf…
Browse files Browse the repository at this point in the history
…ace#5636)

* ignore C901 (to complex ...)

* update ruff version in pre-commit config

* remove C901 from black rules
  • Loading branch information
polinaeterna authored Mar 14, 2023
1 parent fc5c84f commit ce1d107
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
stages: [commit]
args: ["--config", "pyproject.toml", "tests", "src", "benchmarks", "metrics"]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.247'
rev: 'v0.0.255'
hooks:
- id: ruff
stages: [commit]
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ target_version = ['py37']
# Ignored rules:
# "E501" -> line length violation
# "F821" -> undefined named in type annotation (e.g. Literal["something"])
ignore = ["E501", "F821"]
# "C901" -> `function_name` is too complex
ignore = ["E501", "F821", "C901"]
select = ["C", "E", "F", "I", "W"]
line-length = 119

Expand Down

0 comments on commit ce1d107

Please sign in to comment.