Skip to content

Commit

Permalink
MAINT make CI fail when linting fails (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiedbb authored Jul 13, 2023
1 parent c2f4b0a commit 0172dfa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
18 changes: 16 additions & 2 deletions .azure_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ stages:
- stage:
jobs:

- job: 'linting'
displayName: Linting
pool:
vmImage: ubuntu-latest
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- script: |
pip install black
displayName: install black
- script: |
black --check --diff .
displayName: Run black
- template: continuous_integration/windows.yml
parameters:
name: Windows
Expand Down Expand Up @@ -97,7 +112,6 @@ stages:
OPENBLAS_THREADING_LAYER: 'openmp'
CC_OUTER_LOOP: 'gcc'
CC_INNER_LOOP: 'gcc'
LINT: 'true'
# Linux environment with no numpy and heterogeneous OpenMP runtimes.
pylatest_conda_nonumpy_gcc_clang:
PACKAGER: 'conda'
Expand Down Expand Up @@ -172,7 +186,7 @@ stages:
- job: 'no_test_always_skipped'
displayName: 'No test always skipped'
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-latest
steps:
- download: current
- script: |
Expand Down
7 changes: 0 additions & 7 deletions continuous_integration/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ jobs:
# We need to take ownership if we want to update conda or install packages globally
displayName: Take ownership of conda installation
condition: eq('${{ parameters.name }}', 'macOS')
- script: |
conda create -n tmp -y -c conda-forge python black
source activate tmp
black --check .
conda deactivate
displayName: Lint
condition: eq(variables['LINT'], 'true')
- script: |
continuous_integration/install.sh
displayName: 'Install without BLIS'
Expand Down
8 changes: 3 additions & 5 deletions threadpoolctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,11 +1017,9 @@ def _get_libc(cls):
libc_name = find_library("c")
if libc_name is None: # pragma: no cover
warnings.warn(
(
"libc not found. The ctypes module in Python"
f" {sys.version_info.major}.{sys.version_info.minor} is maybe"
" too old for this OS."
),
"libc not found. The ctypes module in Python"
f" {sys.version_info.major}.{sys.version_info.minor} is maybe"
" too old for this OS.",
RuntimeWarning,
)
return None
Expand Down

0 comments on commit 0172dfa

Please sign in to comment.