Skip to content

Commit fd53d87

Browse files
authored
Merge pull request #293 from python-adaptive/pre-commit-bumps
bump pre-commit filter dependencies and add blacken-docs
2 parents 626ac6d + a46559f commit fd53d87

File tree

6 files changed

+28
-40
lines changed

6 files changed

+28
-40
lines changed

.pre-commit-config.yaml

+21-26
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.2.0
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.3.0
44
hooks:
5-
- id: check-docstring-first
6-
- id: check-ast
7-
- id: check-json
8-
- id: check-yaml
9-
- id: debug-statements
10-
- id: end-of-file-fixer
11-
- id: trailing-whitespace
12-
- repo: https://github.com/ambv/black
13-
rev: 19.10b0
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-docstring-first
8+
- id: check-yaml
9+
- id: debug-statements
10+
- id: check-ast
11+
- repo: https://github.com/ambv/black
12+
rev: 20.8b1
1413
hooks:
1514
- id: black
16-
language_version: python3.7
17-
- repo: https://github.com/asottile/pyupgrade
18-
rev: v2.7.2
15+
- repo: https://github.com/asottile/pyupgrade
16+
rev: v2.7.3
1917
hooks:
20-
- id: pyupgrade
21-
args: ['--py36-plus']
22-
- repo: https://github.com/asottile/seed-isort-config
23-
rev: v2.2.0
18+
- id: pyupgrade
19+
args: ['--py36-plus']
20+
- repo: https://github.com/timothycrosley/isort
21+
rev: 5.6.4
2422
hooks:
25-
- id: seed-isort-config
26-
- repo: https://github.com/pre-commit/mirrors-isort
27-
rev: v5.3.2
23+
- id: isort
24+
- repo: https://gitlab.com/pycqa/flake8
25+
rev: 3.8.4
2826
hooks:
29-
- id: isort
30-
- repo: https://gitlab.com/pycqa/flake8
31-
rev: 3.8.3
32-
hooks:
33-
- id: flake8
27+
- id: flake8
28+
args: ['--config=tox.ini']

adaptive/tests/test_cquad.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def test_approximating_intervals():
242242
@pytest.mark.xfail
243243
def test_removed_choose_mutiple_points_at_once():
244244
"""Given that a high-precision interval that was split into 2 low-precision ones,
245-
we should use the high-precision interval.
245+
we should use the high-precision interval.
246246
"""
247247
learner = IntegratorLearner(np.exp, bounds=(0, 1), tol=1e-15)
248248
n = ns[-1] + 2 * (ns[0] - 2) # first + two children (33+6=39)

adaptive/tests/test_learners.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,6 @@ def test_convergence_for_arbitrary_ordering(learner_type, f, learner_kwargs):
626626
@run_with(Learner1D, Learner2D, LearnerND)
627627
def test_learner_subdomain(learner_type, f, learner_kwargs):
628628
"""Learners that never receive data outside of a subdomain should
629-
perform 'similarly' to learners defined on that subdomain only."""
629+
perform 'similarly' to learners defined on that subdomain only."""
630630
# XXX: not sure how to implement this. How do we measure "performance"?
631631
raise NotImplementedError()

adaptive/tests/test_pickling.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ def balancing_learner(f, learner_type, learner_kwargs):
8686
]
8787

8888

89-
@pytest.mark.parametrize(
90-
"learner_type, learner_kwargs, serializer, f", learners,
91-
)
89+
@pytest.mark.parametrize("learner_type, learner_kwargs, serializer, f", learners)
9290
def test_serialization_for(learner_type, learner_kwargs, serializer, f):
9391
"""Test serializing a learner using different serializers."""
9492

adaptive/tests/test_skopt_learner.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@pytest.mark.skipif(not with_scikit_optimize, reason="scikit-optimize is not installed")
1313
def test_skopt_learner_runs():
1414
"""The SKOptLearner provides very few guarantees about its
15-
behaviour, so we only test the most basic usage
15+
behaviour, so we only test the most basic usage
1616
"""
1717

1818
def g(x, noise_level=0.1):
@@ -28,8 +28,8 @@ def g(x, noise_level=0.1):
2828
@pytest.mark.skipif(not with_scikit_optimize, reason="scikit-optimize is not installed")
2929
def test_skopt_learner_4D_runs():
3030
"""The SKOptLearner provides very few guarantees about its
31-
behaviour, so we only test the most basic usage
32-
In this case we test also for 4D domain
31+
behaviour, so we only test the most basic usage
32+
In this case we test also for 4D domain
3333
"""
3434

3535
def g(x, noise_level=0.1):

tox.ini

+1-6
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,4 @@ select = B, C, E, F, W, T4, B9
6060
exclude = .git, .tox, __pycache__, dist
6161

6262
[isort]
63-
multi_line_output=3
64-
include_trailing_comma=True
65-
force_grid_wrap=0
66-
use_parentheses=True
67-
line_length=88
68-
known_third_party=PIL,atomicwrites,flaky,holoviews,matplotlib,nbconvert,numpy,pytest,scipy,setuptools,skopt,sortedcollections,sortedcontainers
63+
profile=black

0 commit comments

Comments
 (0)