Skip to content

Commit 01e26ef

Browse files
committed
merge style and docs fixes from stable-0.8
2 parents afb3591 + 8462acb commit 01e26ef

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ please setup the git filter by executing
113113
114114
in the repository.
115115

116-
We implement several other checks in order to maintain a consistent code style. We do this using [pre-commit`](https://pre-commit.com), execute
116+
We implement several other checks in order to maintain a consistent code style. We do this using `pre-commit <https://pre-commit.com>`_, execute
117117

118118
.. code:: bash
119119

adaptive/learner/integrator_learner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def approximating_intervals(self):
390390

391391
def tell(self, point, value):
392392
if point not in self.x_mapping:
393-
raise ValueError("Point {} doesn't belong to any interval".format(point))
393+
raise ValueError(f"Point {point} doesn't belong to any interval")
394394
self.done_points[point] = value
395395
self.pending_points.discard(point)
396396

adaptive/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,4 +751,4 @@ def _get_ncores(ex):
751751
ex.bootup() # wait until all workers are up and running
752752
return ex._pool.size # not public API!
753753
else:
754-
raise TypeError("Cannot get number of cores for {}".format(ex.__class__))
754+
raise TypeError(f"Cannot get number of cores for {ex.__class__}")

adaptive/tests/test_cquad.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ def test_tell_in_random_order(first_add_33=False):
204204
assert all(ival.a == other_ival.a for ival, other_ival in zip(*ivals))
205205

206206
# Test if the approximating_intervals are the same
207-
ivals = [
208-
{(i.a, i.b) for i in learner.approximating_intervals} for l in learners
209-
]
207+
ivals = [{(i.a, i.b) for i in l.approximating_intervals} for l in learners]
210208
assert ivals[0] == ivals[1]
211209

212210
# Test whether the igral is identical

adaptive/tests/test_learners.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate_random_parametrization(f):
7575
_, *params = inspect.signature(f).parameters.items()
7676
if any(not callable(v.annotation) for (p, v) in params):
7777
raise TypeError(
78-
"All parameters to {} must be annotated with functions.".format(f.__name__)
78+
f"All parameters to {f.__name__} must be annotated with functions."
7979
)
8080
realization = {p: v.annotation() for (p, v) in params}
8181
return ft.partial(f, **realization)

docs/environment.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: adaptive
22

33
channels:
4-
- conda-forge
4+
- conda-forge
55

66
dependencies:
7-
- python=3.7
7+
- python=3.7.3
8+
- sortedcollections=1.1.2
9+
- scikit-optimize=0.5.2
10+
- scipy=1.2.1
11+
- holoviews=1.11.3
12+
- bokeh=1.0.4
13+
- plotly=3.9.0
14+
- ipywidgets=7.4.2
815
- pip:
9-
- sortedcollections
10-
- scipy
11-
- holoviews==1.12*
12-
- bokeh==1.1*
13-
- plotly
14-
- ipywidgets
15-
- scikit-optimize
1616
- git+https://github.com/basnijholt/jupyter-sphinx.git@widgets_execute
17-
- sphinx_fontawesome
18-
- m2r
17+
- sphinx_fontawesome==0.0.6
18+
- m2r==0.2.1

0 commit comments

Comments
 (0)