Skip to content

Commit 250013a

Browse files
Merge pull request #287 from python-adaptive/update-pre-commit
2 parents 36e6cb5 + 179e539 commit 250013a

6 files changed

Lines changed: 18 additions & 16 deletions

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.4.0
3+
rev: v3.2.0
44
hooks:
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
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
1112
- repo: https://github.com/ambv/black
1213
rev: 19.10b0
1314
hooks:
1415
- id: black
1516
language_version: python3.7
1617
- repo: https://github.com/asottile/pyupgrade
17-
rev: v1.25.2
18+
rev: v2.7.2
1819
hooks:
1920
- id: pyupgrade
2021
args: ['--py36-plus']
2122
- repo: https://github.com/asottile/seed-isort-config
22-
rev: v1.9.3
23+
rev: v2.2.0
2324
hooks:
2425
- id: seed-isort-config
2526
- repo: https://github.com/pre-commit/mirrors-isort
26-
rev: v4.3.21
27+
rev: v5.3.2
2728
hooks:
2829
- id: isort
2930
- repo: https://gitlab.com/pycqa/flake8
30-
rev: 3.7.9
31+
rev: 3.8.3
3132
hooks:
3233
- id: flake8

adaptive/notebook_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def ensure_plotly():
6464
import plotly
6565

6666
if not _plotly_enabled:
67-
import plotly.graph_objs
6867
import plotly.figure_factory
68+
import plotly.graph_objs
6969
import plotly.offline
7070

7171
# This injects javascript and should happen only once

adaptive/tests/test_cquad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ def test_adding_points_and_skip_one_point():
161161
# XXX: This *should* pass (https://github.com/python-adaptive/adaptive/issues/55)
162162
@pytest.mark.xfail
163163
def test_tell_in_random_order(first_add_33=False):
164-
from operator import attrgetter
165164
import random
165+
from operator import attrgetter
166166

167167
tol = 1e-10
168168
for f, a, b in ([f0, 0, 3], [f21, 0, 1], [f24, 0, 3], [f7, 0, 1]):

adaptive/tests/unit/test_triangulation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ def test_triangulation_find_opposing_vertices_raises_if_simplex_is_invalid():
6363

6464

6565
def test_circumsphere():
66-
from adaptive.learner.triangulation import circumsphere, fast_norm
6766
from numpy import allclose
6867
from numpy.random import normal, uniform
6968

69+
from adaptive.learner.triangulation import circumsphere, fast_norm
70+
7071
def generate_random_sphere_points(dim, radius=0):
7172
"""https://math.stackexchange.com/a/1585996"""
7273

benchmarks/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"holoviews": ["1.9.1"],
1515
"scipy": ["0.19.1"],
1616
"ipyparallel": ["6.0.2"],
17-
"sortedcontainers": ["1.5.7"],
17+
"sortedcontainers": ["1.5.7"]
1818
},
1919
"benchmark_dir": "benchmarks",
2020
"env_dir": "env",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ commands = pre-commit run --all-files --show-diff-on-failure
5454

5555
[flake8]
5656
max-line-length = 100
57-
ignore = E501, W503, E203, E266
57+
ignore = E501, W503, E203, E266, E741
5858
max-complexity = 18
5959
select = B, C, E, F, W, T4, B9
6060
exclude = .git, .tox, __pycache__, dist

0 commit comments

Comments
 (0)