Rules
Open any rule by its bracketed ID (such as pandas/chained-assignment) to read what goes wrong, what to write instead, and whether xpd can fix it automatically. Every library pack runs only on files that import that library, while the Python and xpd packs run on every file.
| Fix level | Meaning | Command |
|---|---|---|
safe |
Preserves runtime behavior | xpd check --fix |
unsafe |
May change runtime behavior, review the diff | xpd check --fix --unsafe-fixes |
none |
Requires a manual edit | Edit by hand |
House style rules report as info by default and become warning when style = "strict" is set in [tool.xpd] of pyproject.toml or ~/.config/xpd/config.toml. See xpd check.
| Pack | Rules | Safe fix | Unsafe fix | No fix |
|---|---|---|---|---|
| pandas | 140 | 5 | 94 | 41 |
| Polars | 35 | 2 | 20 | 13 |
| NumPy | 64 | 1 | 49 | 14 |
| SciPy | 31 | 2 | 22 | 7 |
| scikit-learn | 46 | 1 | 23 | 22 |
| skrub | 6 | 0 | 0 | 6 |
| Feature-engine | 6 | 0 | 0 | 6 |
| scikit-lego | 25 | 1 | 15 | 9 |
| optbinning | 6 | 0 | 0 | 6 |
| glum | 6 | 1 | 0 | 5 |
| interpret | 5 | 0 | 0 | 5 |
| Quantile Forest | 4 | 0 | 1 | 3 |
| MAPIE | 14 | 1 | 6 | 7 |
| venn_abers | 5 | 0 | 0 | 5 |
| PyMC | 7 | 3 | 3 | 1 |
| skore | 5 | 1 | 0 | 4 |
| model-diagnostics | 5 | 0 | 2 | 3 |
| shap | 10 | 0 | 0 | 10 |
| fippy | 7 | 0 | 0 | 7 |
| effector | 8 | 2 | 0 | 6 |
| Optuna | 5 | 1 | 1 | 3 |
| Optuna Integration | 7 | 0 | 0 | 7 |
| Category Encoders | 16 | 1 | 9 | 6 |
| linearmodels | 25 | 0 | 16 | 9 |
| arch | 13 | 1 | 6 | 6 |
| tslearn | 8 | 1 | 1 | 6 |
| skfolio | 24 | 1 | 12 | 11 |
| pymoo | 23 | 2 | 17 | 4 |
| plotly | 26 | 0 | 12 | 14 |
| Hamilton | 1 | 0 | 0 | 1 |
| DSPy | 11 | 1 | 0 | 10 |
| Python | 50 | 0 | 15 | 35 |
| xpd | 1 | 0 | 1 | 0 |
| CoreForecast | 3 | 0 | 1 | 2 |
| CVXPY | 8 | 1 | 0 | 7 |
| Feature review | 4 | 0 | 0 | 4 |
| HierarchicalForecast | 1 | 0 | 0 | 1 |
| LightGBM | 10 | 1 | 3 | 6 |
| MLForecast | 4 | 0 | 0 | 4 |
| StatsForecast | 1 | 0 | 0 | 1 |
| statsmodels | 7 | 1 | 3 | 3 |
| Time series review | 5 | 0 | 0 | 5 |
| UtilsForecast | 2 | 0 | 0 | 2 |
| XGBoost | 11 | 1 | 1 | 9 |
| All packs | 701 | 32 | 333 | 336 |