Skip to content

Commit

Permalink
Configure ruff by allowing all rules and then exclude some
Browse files Browse the repository at this point in the history
  • Loading branch information
cbornet committed Aug 1, 2024
1 parent c87c3d7 commit 06a28ba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 101 deletions.
57 changes: 7 additions & 50 deletions libs/knowledge-graph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,71 +62,28 @@ target-version = "py311"

[tool.ruff.lint]
pydocstyle.convention = "google"
select = ["ALL"]
ignore = [
"ANN", # Do we want to activate (type hints) ?
"C90", # Do we want to activate (complexity) ?
"COM812", # Messes with the formatter
"D100", # Do we want to activate (docstring in module) ?
"D104", # Do we want to activate (docstring in package) ?
"D105", # Do we want to activate (docstring in magic method) ?
"D107", # Do we want to activate (docstring in __init__) ?
"EM", # Do we want to activate (error messages) ?
"ERA", # Do we want to activate (no commented code) ?
"FBT", # Do we want to activate (boolean trap) ?
"FIX", # Do we want to activate (no fix-me) ?
"ISC001", # Messes with the formatter
"PERF203", # Incorrect detection
"PLR09", # TODO: do we enforce these ones (complexity) ?
"PTH", # Do we want to activate (use pathlib) ?
"TRY003", # A bit too strict ?
"TD002", # We know the TODOs authors with git. Activate anyway ?
"TD003", # Do we want to activate (TODOs with issue reference) ?
]

select = [
"A",
"ARG",
"ASYNC",
"B",
"BLE",
"C4",
"COM",
"D",
"DTZ",
"E",
"EXE",
"F",
"FLY",
"FURB",
"G",
"I",
"ICN",
"INP",
"INT",
"ISC",
"LOG",
"N",
"NPY",
"PD",
"PERF",
"PGH",
"PIE",
"PL",
"PT",
"PYI",
"Q",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"SLF",
"SLOT",
"T10",
"T20",
"TCH",
"TD",
"TID",
"TRY",
"UP",
"W",
"YTT",
]

[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D",
Expand Down
58 changes: 7 additions & 51 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,72 +59,28 @@ extend-include = ["*.ipynb"]

[tool.ruff.lint]
pydocstyle.convention = "google"
select = ["ALL"]
ignore = [
"ANN", # Do we want to activate (type hints) ?
"C90", # Do we want to activate (complexity) ?
"COM812", # Messes with the formatter
"D100", # Do we want to activate (docstring in module) ?
"D104", # Do we want to activate (docstring in package) ?
"D105", # Do we want to activate (docstring in magic method) ?
"D107", # Do we want to activate (docstring in __init__) ?
"EM", # Do we want to activate (error messages) ?
"ERA", # Do we want to activate (no commented code) ?
"FBT", # Do we want to activate (boolean trap) ?
"FIX", # Do we want to activate (no fix-me) ?
"ISC001", # Messes with the formatter
"PERF203", # Incorrect detection
"PLR09", # TODO: do we enforce these ones (complexity) ?
"PTH", # Do we want to activate (use pathlib) ?
"TRY003", # A bit too strict ?
"TD002", # We know the TODOs authors with git. Activate anyway ?
"TD003", # Do we want to activate (TODOs with issue reference) ?
]

select = [
"A",
"ARG",
"ASYNC",
"B",
"BLE",
"C4",
"COM",
"D",
"DTZ",
"E",
"EXE",
"F",
"FA",
"FLY",
"FURB",
"G",
"I",
"ICN",
"INP",
"INT",
"ISC",
"LOG",
"N",
"NPY",
"PD",
"PERF",
"PGH",
"PIE",
"PL",
"PT",
"PYI",
"Q",
"RET",
"RSE",
"RUF",
"S",
"SIM",
"SLF",
"SLOT",
"T10",
"T20",
"TCH",
"TD",
"TID",
"TRY",
"UP",
"W",
"YTT",
]

[tool.ruff.lint.per-file-ignores]
"libs/langchain/*" = [
"UP006", # Incompatible with Pydantic v1
Expand Down

0 comments on commit 06a28ba

Please sign in to comment.