Skip to content

Commit

Permalink
Update ruff to 0.2.2 (#608)
Browse files Browse the repository at this point in the history
Co-authored-by: Saaketh Narayan <[email protected]>
Co-authored-by: Karan Jariwala <[email protected]>
  • Loading branch information
3 people authored Mar 5, 2024
1 parent 74261f7 commit b4a317c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exclude: "^(streaming/text/convert/enwiki/)"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.4
rev: v0.2.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
75 changes: 42 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,48 @@ multi_line_output = 0
line_length = 99
skip = [ "env", "wandb", "runs", "build", "node_modules" ]

# ruff
[tool.ruff.lint]
select = [
"C4",
"D", # pydocstyle
"LOG",
"PERF",
"PLE",
]
ignore = [
"C408",
"D102",
"D105",
"D107",
"D203", # default ignore
"D212", # default ignore
"D213", # default ignore
"D401",
"D404", # default ignore
"D417", # ruff only rulecode
"E501",
"E722",
"E741",
"PERF2",
"PERF4",
]

[tool.ruff]
exclude = [
"build/**",
"docs/**",
"node_modules/**",
]


[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]
"streaming/text/convert/enwiki/*" = ["D"]

# Pyright
[tool.pyright]
include = [
Expand Down Expand Up @@ -485,39 +527,6 @@ split_penalty_logical_operator = 300
# Use the Tab character for indentation.
use_tabs = false

[tool.ruff]
select = [
"C4",
"D", # pydocstyle
"PERF",
]

ignore = [
"C408",
"D102",
"D105",
"D107",
"D203", # default ignore
"D212", # default ignore
"D213", # default ignore
"D401",
"D404", # default ignore
"D417", # ruff only rulecode
"PERF2",
"PERF4",
]
exclude = [
"build/**",
"docs/**",
"node_modules/**",
]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]

# Ignore directories
[tool.yapfignore]
ignore_patterns = [
Expand Down

0 comments on commit b4a317c

Please sign in to comment.