From 50a2a91cfcf94fbc03fbb351284ed84ec49d853d Mon Sep 17 00:00:00 2001 From: Hamid Arian Date: Fri, 19 Jun 2026 00:42:42 -0400 Subject: [PATCH] ci: pin black and ruff to exact versions; format for black 26.x --- .github/workflows/ci.yml | 4 ++-- RiskLabAI/ensemble/bagging_classifier_accuracy.py | 1 + pyproject.toml | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c2e983..c5baf55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" - - run: pip install black + - run: pip install "black==26.5.1" - run: black --check RiskLabAI test lint: @@ -71,5 +71,5 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" - - run: pip install ruff + - run: pip install "ruff==0.15.17" - run: ruff check RiskLabAI test diff --git a/RiskLabAI/ensemble/bagging_classifier_accuracy.py b/RiskLabAI/ensemble/bagging_classifier_accuracy.py index 82f60a5..7e521d6 100644 --- a/RiskLabAI/ensemble/bagging_classifier_accuracy.py +++ b/RiskLabAI/ensemble/bagging_classifier_accuracy.py @@ -4,6 +4,7 @@ as described in "Advances in Financial Machine Learning" by de Prado (2018), Chapter 6, Section 6.2, p. 86. """ + # import numpy as np <-- Removed unused import from scipy.stats import binom diff --git a/pyproject.toml b/pyproject.toml index 28e80e2..fe91058 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,6 +61,9 @@ dev = [ "torchvision", # Often needed with torch "torchaudio", # Often needed with torch "pytest", + # Linters pinned to match CI exactly (.github/workflows/ci.yml). + "black==26.5.1", + "ruff==0.15.17", ] all = [ "RiskLabAI[pde]",