Skip to content

Commit fb190b4

Browse files
authored
Revert "style: add ruff and black to pre-commit (#1459)"
This reverts commit 9043fb7.
1 parent 9043fb7 commit fb190b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4967
-5401
lines changed

.git-blame-ignore-revs

Lines changed: 0 additions & 2 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,20 @@ default_stages: [commit, push]
55
default_language_version:
66
python: python3
77
repos:
8-
- repo: https://github.com/charliermarsh/ruff-pre-commit
9-
# Ruff version.
10-
rev: 'v0.0.224'
8+
- repo: https://github.com/PyCQA/flake8
9+
rev: 6.0.0
1110
hooks:
12-
- id: ruff
13-
# Respect `exclude` and `extend-exclude` settings.
14-
args: ["--force-exclude"]
15-
- repo: https://github.com/psf/black
16-
rev: 22.12.0
17-
hooks:
18-
- id: black
19-
language_version: python3.8
11+
- id: flake8
12+
args: [
13+
--max-line-length=100
14+
]
15+
exclude: ^(venv/|docs/)
16+
types: ['python']
2017
- repo: https://github.com/codespell-project/codespell
2118
rev: v2.2.5
2219
hooks:
2320
- id: codespell
24-
args: ["-L", "ba,ihs,kake,nd,noe,nwo,te,fo,zar", "-S", "fixture"]
21+
args: ["-L", "ba,ihs,kake,nd,noe,nwo,te,fo", "-S", "fixture"]
2522
- repo: https://github.com/pre-commit/pre-commit-hooks
2623
rev: v4.4.0
2724
hooks:

bench/compress_normal.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,36 @@
99

1010
if __name__ == "__main__":
1111

12-
sys.path.insert(0, "..")
12+
sys.path.insert(0, '..')
1313

1414
# setup
15-
a = np.random.normal(2000, 1000, size=200000000).astype("u2")
16-
z = zarr.empty_like(
17-
a,
18-
chunks=1000000,
19-
compression="blosc",
20-
compression_opts=dict(cname="lz4", clevel=5, shuffle=2),
21-
)
15+
a = np.random.normal(2000, 1000, size=200000000).astype('u2')
16+
z = zarr.empty_like(a, chunks=1000000,
17+
compression='blosc',
18+
compression_opts=dict(cname='lz4', clevel=5, shuffle=2))
2219
print(z)
2320

24-
print("*" * 79)
21+
print('*' * 79)
2522

2623
# time
27-
t = timeit.repeat("z[:] = a", repeat=10, number=1, globals=globals())
24+
t = timeit.repeat('z[:] = a', repeat=10, number=1, globals=globals())
2825
print(t)
2926
print(min(t))
3027
print(z)
3128

3229
# profile
3330
profile = line_profiler.LineProfiler(blosc.compress)
34-
profile.run("z[:] = a")
31+
profile.run('z[:] = a')
3532
profile.print_stats()
3633

37-
print("*" * 79)
34+
print('*' * 79)
3835

3936
# time
40-
t = timeit.repeat("z[:]", repeat=10, number=1, globals=globals())
37+
t = timeit.repeat('z[:]', repeat=10, number=1, globals=globals())
4138
print(t)
4239
print(min(t))
4340

4441
# profile
4542
profile = line_profiler.LineProfiler(blosc.decompress)
46-
profile.run("z[:]")
43+
profile.run('z[:]')
4744
profile.print_stats()

0 commit comments

Comments
 (0)