Skip to content

Commit d41f75f

Browse files
Fix linter errors and style failures
1 parent 764f34e commit d41f75f

File tree

5 files changed

+15
-21
lines changed

5 files changed

+15
-21
lines changed

numcodecs/tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import array
22
import json as _json
33
import os
4-
from glob import glob
54
import platform
65
import sys
6+
from glob import glob
77

88
import numpy as np
99
import pytest

numcodecs/tests/test_blosc.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313

1414
from numcodecs.tests.common import (
15-
is_wasm,
1615
check_backwards_compatibility,
1716
check_config,
1817
check_encode_decode,
1918
check_encode_decode_partial,
2019
check_err_decode_object_buffer,
2120
check_err_encode_object_buffer,
2221
check_max_buffer_size,
22+
is_wasm,
2323
)
2424

2525
codecs = [
@@ -226,11 +226,8 @@ def _decode_worker(enc):
226226
return data
227227

228228

229-
@pytest.mark.skipif(
230-
is_wasm,
231-
reason="WASM/Pyodide does not support multiprocessing"
232-
)
233-
@pytest.mark.parametrize('pool', (Pool, ThreadPool))
229+
@pytest.mark.skipif(is_wasm, reason="WASM/Pyodide does not support multiprocessing")
230+
@pytest.mark.parametrize('pool', [Pool, ThreadPool])
234231
def test_multiprocessing(use_threads, pool):
235232
data = np.arange(1000000)
236233
enc = _encode_worker(data)

numcodecs/tests/test_shuffle.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212

1313
from numcodecs.tests.common import (
14-
is_wasm,
1514
check_backwards_compatibility,
1615
check_config,
1716
check_encode_decode,
17+
is_wasm,
1818
)
1919

2020
codecs = [
@@ -90,11 +90,8 @@ def _decode_worker(enc):
9090
return data
9191

9292

93-
@pytest.mark.skipif(
94-
is_wasm,
95-
reason="WASM/Pyodide does not support multiprocessing"
96-
)
97-
@pytest.mark.parametrize('pool', (Pool, ThreadPool))
93+
@pytest.mark.skipif(is_wasm, reason="WASM/Pyodide does not support multiprocessing")
94+
@pytest.mark.parametrize('pool', [Pool, ThreadPool])
9895
def test_multiprocessing(pool):
9996
data = np.arange(1000000)
10097
enc = _encode_worker(data)

tools/ci/patches/0001-disable-multiprocessing-and-pthreads.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ index 3bfdc00..c6521b7 100644
1717
+ mutex = None
1818
except OSError:
1919
mutex = None
20-
20+
2121
diff --git a/c-blosc/blosc/blosc.h b/c-blosc/blosc/blosc.h
2222
index 40857d0..8a1e969 100644
2323
--- a/c-blosc/blosc/blosc.h
2424
+++ b/c-blosc/blosc/blosc.h
2525
@@ -50,7 +50,7 @@ extern "C" {
2626
((INT_MAX - BLOSC_MAX_TYPESIZE * sizeof(int32_t)) / 3)
27-
27+
2828
/* The maximum number of threads (for some static arrays) */
2929
-#define BLOSC_MAX_THREADS 256
3030
+#define BLOSC_MAX_THREADS 1
31-
31+
3232
/* Codes for shuffling (see blosc_compress) */
3333
#define BLOSC_NOSHUFFLE 0 /* no shuffle */
3434

@@ -37,11 +37,11 @@ index a5a5bd5..2a7797c 100644
3737
--- a/c-blosc/blosc/blosc.c
3838
+++ b/c-blosc/blosc/blosc.c
3939
@@ -2236,6 +2236,7 @@ void blosc_atfork_child(void) {
40-
40+
4141
void blosc_init(void)
4242
{
4343
+ g_initlib = 1;
4444
/* Return if we are already initialized */
4545
if (g_initlib) return;
46-
46+
4747

tools/ci/patches/0002-add-missing-unistd-headers.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ index fae202e..80606a6 100644
1616
-
1717
+#include <unistd.h>
1818
#include "gzguts.h"
19-
19+
2020
#if defined(_WIN32) && !defined(__BORLANDC__)
2121

2222
diff --git a/c-blosc/internal-complibs/zlib-1.2.13/gzread.c b/c-blosc/internal-complibs/zlib-1.2.13/gzread.c
@@ -30,7 +30,7 @@ index bf4538e..afe6acd 100644
3030
-
3131
+#include <unistd.h>
3232
#include "gzguts.h"
33-
33+
3434
/* Local functions */
3535

3636

@@ -45,5 +45,5 @@ index aa767fb..a87676f 100644
4545
-
4646
+#include <unistd.h>
4747
#include "gzguts.h"
48-
48+
4949
/* Local functions */

0 commit comments

Comments
 (0)