From 459e5f9b16780f67067e2146e1b8dc312b103652 Mon Sep 17 00:00:00 2001 From: Dan Saunders Date: Fri, 29 Aug 2025 21:52:57 -0400 Subject: [PATCH] lint --- pyproject.toml | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 33403af82..b04573318 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,13 +38,13 @@ dependencies = [ "hf_xet==1.1.5", "kernels==0.9.0", "trackio", - + # Optimization and training "optimum==1.16.2", "hf_transfer", "sentencepiece", "gradio==5.41.1", - + # Infrastructure "modal==1.0.2", "pydantic==2.10.6", @@ -57,7 +57,7 @@ dependencies = [ "colorama", "numba", "numpy>=1.24.4,<3.0", - + # QLora dependencies "evaluate==0.4.1", "scipy", @@ -66,33 +66,33 @@ dependencies = [ "art", "tensorboard", "python-dotenv==1.0.1", - + # Remote filesystems "s3fs>=2024.5.0", "gcsfs>=2024.5.0", "adlfs>=2024.5.0", "ocifs==1.3.2", - + # Other utilities "zstandard>=0.23.0", "fastcore", - + # LM eval harness "lm_eval==0.4.7", "langdetect==1.0.9", "immutabledict==4.2.0", "antlr4-python3-runtime==4.13.2", - + # Training optimizers "schedulefree==1.4.1", - + # Axolotl contribs "axolotl-contribs-lgpl @ git+https://github.com/axolotl-ai-cloud/axolotl-contribs-lgpl.git@numpy", "axolotl-contribs-mit==0.0.5", - + # Mistral "mistral-common==1.8.3", - + # Platform-specific dependencies (Linux by default, excluded on macOS) "triton>=3.0.0,<3.4.0 ; sys_platform != 'darwin'", "xformers>=0.0.23.post1 ; sys_platform != 'darwin'", @@ -199,8 +199,31 @@ line-length = 88 target-version = "py310" [tool.ruff.lint] -select = ["E", "F", "I", "W"] -ignore = ["E501"] +select = ["E", "F", "W", "C90", "B"] +ignore = [ + "E203", # Whitespace before ':' + "E501", # Line too long + "C901", # Too complex + "B019", # Use of functools.cache on methods + "E722", # Bare except + "F821", # Undefined name (for dynamic exec) +] + +[tool.ruff.lint.isort] +known-third-party = ["wandb", "comet_ml"] +known-local-folder = ["src", "tests"] +# Black-compatible isort settings +force-single-line = false +combine-as-imports = true +split-on-trailing-comma = true + +[tool.ruff.format] +# Use black's formatting style exactly +quote-style = "double" +indent-style = "space" +skip-magic-trailing-comma = false +line-ending = "auto" +docstring-code-format = false [tool.mypy] python_version = "3.10"