-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ruff): 🏗️ support use of ruff (#125)
* build(ruff): 🏗️ support use of ruff * ci: add missing ruff dependency * ci: update ruff hook names * build(lint): ⚰️ remove black and isort dependencies This is not needed as they have been replaced with support from ruff. --------- Co-authored-by: Oleksandr Yaremchuk <[email protected]>
- Loading branch information
1 parent
2d5d4a6
commit fb795f9
Showing
18 changed files
with
1,058 additions
and
1,013 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
extend-include = ["*.ipynb"] | ||
line-length = 100 | ||
src = [ | ||
"llm_guard", | ||
"tests", | ||
] | ||
exclude = ["examples/google_gemini.py"] | ||
|
||
[lint] | ||
ignore = [ | ||
'RUF001' # String contains ambiguous `,` | ||
] | ||
ignore-init-module-imports = true | ||
select = [ | ||
'A', # flake8-builtins | ||
'ASYNC', # flake8-async | ||
'ERA', # eradicate | ||
'F', # Pyflakes | ||
'I', # Isort | ||
'NPY', # NumPy Rules | ||
'PERF', # performance | ||
'PYI', # flake8-pyi | ||
] | ||
|
||
[lint.flake8-builtins] | ||
builtins-ignorelist = ["input"] | ||
|
||
|
||
[lint.isort] | ||
combine-as-imports = true | ||
known-first-party = [ | ||
"llm_guard", | ||
"tests", | ||
] | ||
split-on-trailing-comma = false | ||
|
||
[lint.pep8-naming] | ||
ignore-names = [] | ||
|
||
[lint.per-file-ignores] | ||
"__init__.py" = [ | ||
"F401", # Import imported into __init__ by unused; consider adding to `__all__` or using a redundant alias | ||
"F403", # Unable to detect undefined names | ||
"F405", # May be undefined, or defined from star imports | ||
] | ||
|
||
[lint.pydocstyle] | ||
convention = "google" |
Oops, something went wrong.