Skip to content

Commit 9636234

Browse files
authored
Merge pull request #237 from python-adaptive/power-up-pre-commit
Power up pre-commit
2 parents 65ac7d3 + c60d8ca commit 9636234

35 files changed

+60
-77
lines changed

.isort.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
known_third_party = PIL,atomicwrites,holoviews,ipykernel,matplotlib,nbconvert,numpy,pytest,scipy,setuptools,skopt,sortedcollections,sortedcontainers,zmq

.pre-commit-config.yaml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,43 @@
11
repos:
2-
- repo: https://github.com/ambv/black
3-
rev: 19.3b0
4-
hooks:
5-
- id: black
6-
language_version: python3.7
72
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v2.1.0
3+
rev: v2.4.0
94
hooks:
10-
- id: end-of-file-fixer
115
- 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
1211
- repo: https://gitlab.com/pycqa/flake8
13-
rev: 3.7.8
12+
rev: 3.7.9
1413
hooks:
1514
- id: flake8
16-
args: ['--max-line-length=500', '--ignore=E203,E266,E501,W503', '--max-complexity=18', '--select=B,C,E,F,W,T4,B9']
15+
args:
16+
- --max-line-length=500
17+
- --ignore=E203,E266,E501,W503
18+
- --max-complexity=18
19+
- --select=B,C,E,F,W,T4,B9
20+
- repo: https://github.com/ambv/black
21+
rev: 19.10b0
22+
hooks:
23+
- id: black
24+
language_version: python3.7
25+
- repo: https://github.com/asottile/pyupgrade
26+
rev: v1.25.2
27+
hooks:
28+
- id: pyupgrade
29+
args: ['--py36-plus']
30+
- repo: https://github.com/pre-commit/mirrors-isort
31+
rev: v4.3.21
32+
hooks:
33+
- id: isort
34+
args:
35+
- --multi-line=3
36+
- --trailing-comma
37+
- --force-grid-wrap=0
38+
- --use-parentheses
39+
- --line-width=88
40+
- repo: https://github.com/asottile/seed-isort-config
41+
rev: v1.9.3
42+
hooks:
43+
- id: seed-isort-config

adaptive/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from contextlib import suppress
42

53
from adaptive import learner, runner, utils

adaptive/_version.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# This file is part of 'miniver': https://github.com/jbweston/miniver
32
#
43
import os

adaptive/learner/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from contextlib import suppress
42

53
from adaptive.learner.average_learner import AverageLearner

adaptive/learner/average_learner.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from math import sqrt
42

53
import numpy as np

adaptive/learner/balancing_learner.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import itertools
42
from collections import defaultdict
53
from collections.abc import Iterable

adaptive/learner/base_learner.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# -*- coding: utf-8 -*-
2-
31
import abc
42
from contextlib import suppress
53
from copy import deepcopy
64

7-
from adaptive.utils import load, save, _RequireAttrsABCMeta
5+
from adaptive.utils import _RequireAttrsABCMeta, load, save
86

97

108
def uses_nth_neighbors(n):

adaptive/learner/data_saver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
import functools
42
from collections import OrderedDict
53

adaptive/learner/integrator_coeffs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# Based on an adaptive quadrature algorithm by Pedro Gonnet
32

43
from collections import defaultdict

0 commit comments

Comments
 (0)