Skip to content

Commit

Permalink
Flake8 update fix (handley-lab#323)
Browse files Browse the repository at this point in the history
* Bumped version

* New flake8 compliance wo is/is not

* version bump to 2.1.4

* Moved to ininstance

---------

Co-authored-by: Lukas Hergt <[email protected]>
  • Loading branch information
williamjameshandley and lukashergt authored Aug 1, 2023
1 parent ae8ee9d commit 4a35d6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
anesthetic: nested sampling post-processing
===========================================
:Authors: Will Handley and Lukas Hergt
:Version: 2.1.3
:Version: 2.1.4
:Homepage: https://github.com/handley-lab/anesthetic
:Documentation: http://anesthetic.readthedocs.io/

Expand Down
2 changes: 1 addition & 1 deletion anesthetic/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.3'
__version__ = '2.1.4'
2 changes: 1 addition & 1 deletion anesthetic/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ def hist_plot_1d(ax, data, *args, **kwargs):
xmax = quantile(data, q[-1], weights)
range = kwargs.pop('range', (xmin, xmax))

if type(bins) == str and bins in ['knuth', 'freedman', 'blocks']:
if isinstance(bins, str) and bins in ['knuth', 'freedman', 'blocks']:
try:
h, edges, bars = hist(data, ax=ax, bins=bins,
range=range, histtype=histtype,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@ def test_hdf5(tmp_path, root):

with HDFStore(filename) as store:
assert_frame_equal(samples, store[key])
assert type(store[key]) == type(samples)
assert type(store[key]) is type(samples)

samples.to_hdf(filename, key)

with HDFStore(filename) as store:
assert_frame_equal(samples, store[key])
assert type(store[key]) == type(samples)
assert type(store[key]) is type(samples)

samples_ = read_hdf(filename, key)
assert_frame_equal(samples_, samples)
assert type(samples_) == type(samples)
assert type(samples_) is type(samples)

0 comments on commit 4a35d6e

Please sign in to comment.