From 4a35d6ea427d0dd39e3a17f5b74968fd21d06846 Mon Sep 17 00:00:00 2001 From: Will Handley Date: Tue, 1 Aug 2023 19:04:28 +0100 Subject: [PATCH] Flake8 update fix (#323) * Bumped version * New flake8 compliance wo is/is not * version bump to 2.1.4 * Moved to ininstance --------- Co-authored-by: Lukas Hergt --- README.rst | 2 +- anesthetic/_version.py | 2 +- anesthetic/plot.py | 2 +- tests/test_reader.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 8d780bb6..b3b82ad9 100644 --- a/README.rst +++ b/README.rst @@ -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/ diff --git a/anesthetic/_version.py b/anesthetic/_version.py index 2d31b1c3..503eeb92 100644 --- a/anesthetic/_version.py +++ b/anesthetic/_version.py @@ -1 +1 @@ -__version__ = '2.1.3' +__version__ = '2.1.4' diff --git a/anesthetic/plot.py b/anesthetic/plot.py index c6002486..e3f3b219 100644 --- a/anesthetic/plot.py +++ b/anesthetic/plot.py @@ -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, diff --git a/tests/test_reader.py b/tests/test_reader.py index ad28313b..911e43ec 100644 --- a/tests/test_reader.py +++ b/tests/test_reader.py @@ -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)