Skip to content

Commit f6aa2e6

Browse files
authored
Merge branch 'main' into batched-inference-and-padding
2 parents ad5da03 + 568c5f8 commit f6aa2e6

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ repos:
2020
- id: isort
2121
additional_dependencies:
2222
- pyproject.toml
23+
- repo: https://github.com/astral-sh/ruff-pre-commit
24+
rev: v0.0.280
25+
hooks:
26+
- id: ruff

pyproject.toml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,3 +527,56 @@ overgeneral-exceptions=[
527527
'Exception',
528528
'BaseException',
529529
]
530+
531+
[tool.ruff]
532+
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
533+
select = ["E", "F"]
534+
ignore = []
535+
536+
# Allow autofix for all enabled rules (when `--fix`) is provided.
537+
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
538+
unfixable = []
539+
540+
# Exclude a variety of commonly ignored directories.
541+
exclude = [
542+
".bzr",
543+
".direnv",
544+
".eggs",
545+
".git",
546+
".git-rewrite",
547+
".hg",
548+
".mypy_cache",
549+
".nox",
550+
".pants.d",
551+
".pytype",
552+
".ruff_cache",
553+
".svn",
554+
".tox",
555+
".venv",
556+
"__pypackages__",
557+
"_build",
558+
"buck-out",
559+
"build",
560+
"dist",
561+
"node_modules",
562+
"venv",
563+
]
564+
565+
# Same as Black.
566+
line-length = 160
567+
568+
# Allow unused variables when underscore-prefixed.
569+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
570+
571+
# Assume Python 3.10.
572+
target-version = "py310"
573+
574+
ignore-init-module-imports = true
575+
576+
[tool.ruff.mccabe]
577+
# Unlike Flake8, default to a complexity level of 10.
578+
max-complexity = 10
579+
580+
[tool.ruff.per-file-ignores]
581+
# ignore import issues in __init__ files
582+
"__init__.py" = ["E402", "F403", "F405", "F401"]

0 commit comments

Comments
 (0)