From 83c46284b712c42d499044ab4ef29e4fe2a0df63 Mon Sep 17 00:00:00 2001 From: mathurinm Date: Tue, 19 Apr 2022 15:13:49 +0200 Subject: [PATCH] ENH run flake8 job on PRs from forks (#236) --- .github/workflows/flake8.yml | 9 ++++++++- celer/tests/test_logreg.py | 2 +- celer/tests/test_mtl.py | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index e4d1acf5..e8cbc908 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -1,6 +1,13 @@ name: linter -on: push +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + jobs: lint: diff --git a/celer/tests/test_logreg.py b/celer/tests/test_logreg.py index 3eb8931a..fced51da 100644 --- a/celer/tests/test_logreg.py +++ b/celer/tests/test_logreg.py @@ -4,7 +4,7 @@ import numpy as np from numpy.linalg import norm -from numpy.testing import assert_allclose, assert_array_less, assert_array_equal +from numpy.testing import assert_allclose, assert_array_less from sklearn.linear_model._logistic import _logistic_regression_path from sklearn.utils.estimator_checks import check_estimator from sklearn.linear_model import LogisticRegression as sklearn_Logreg diff --git a/celer/tests/test_mtl.py b/celer/tests/test_mtl.py index ce292eb4..ae0f0926 100644 --- a/celer/tests/test_mtl.py +++ b/celer/tests/test_mtl.py @@ -1,5 +1,4 @@ import pytest -import warnings import itertools import numpy as np