Add a default ruff.toml config file
This commit is contained in:
parent
14eb501ad8
commit
26c55eab5c
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
|
xdg.configFile."ruff/pyproject.toml".source = ./ruff.toml;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Nix
|
# Nix
|
||||||
nil
|
nil
|
||||||
|
|
33
home/prog/ruff.toml
Normal file
33
home/prog/ruff.toml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[lint]
|
||||||
|
select = [
|
||||||
|
"F", "E4", "E7", "E9", # Defaults
|
||||||
|
"W", # pycodestyle warnings
|
||||||
|
"B", # Flake8 bugbear rules
|
||||||
|
"PD", # Pandas vet rules
|
||||||
|
"NPY", # NumPy specific rules
|
||||||
|
"RUF", # Ruff specific rules
|
||||||
|
"E1", # pycodestyle indentation rules
|
||||||
|
"E501", # Line too long
|
||||||
|
"C901", # Complex structure
|
||||||
|
"I001", # Import block un-sorted / un-formatted
|
||||||
|
]
|
||||||
|
ignore = [
|
||||||
|
"W191", # Ignore due to conflict with ruff formatter
|
||||||
|
"E111", # Ignore due to conflict with ruff formatter
|
||||||
|
"E114", # Ignore due to conflict with ruff formatter
|
||||||
|
"E117", # Ignore due to conflict with ruff formatter
|
||||||
|
"D206", # Ignore due to conflict with ruff formatter
|
||||||
|
"D300", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q000", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q001", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q002", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q003", # Ignore due to conflict with ruff formatter
|
||||||
|
"COM812", # Ignore due to conflict with ruff formatter
|
||||||
|
"COM819", # Ignore due to conflict with ruff formatter
|
||||||
|
"ISC001", # Ignore due to conflict with ruff formatter
|
||||||
|
"ISC002", # Ignore due to conflict with ruff formatter
|
||||||
|
]
|
||||||
|
unfixable = ["B", "W", "E1", "C901" ""]
|
||||||
|
|
||||||
|
[format]
|
||||||
|
docstring-code-format = true
|
Loading…
Reference in a new issue