diff --git a/hm/dev/python.nix b/hm/dev/python.nix index d03e511..4d9ec18 100644 --- a/hm/dev/python.nix +++ b/hm/dev/python.nix @@ -22,16 +22,29 @@ ruff = { enable = true; settings = { + target-version = "py311"; # Matches Debian 12 + line-length = 79; # writePython3 enforces PEP-8 lint = { - select = [ - # Original - "F" # pyflakes - "I" # isort - "C90" # mccabe (complexity) - "E" # pycodestyle error - "W" # pycodestyle warning - "PL" # pylint + select = [ "ALL" ]; + ignore = [ + # Things that don't teach me to write better Python + "CPY" # Copyright + "D1" # missing docstring + "ERA" # commented out code + "FIX002" # enforce TODOs + "T20" # print + "TD" # TODOs convention + "INP" # missing __init__.py + "S603" # subproces untrusted input (broken?) + "S101" # asserts + # Allow nix-shell + "EXE003" + "EXE005" + # Conflict with formatter + "COM" + "ISC001" ]; + pydocstyle.convention = "pep257"; }; }; };