From 98ae5ac642fd8996ec312d772f6ade73fe72a76a Mon Sep 17 00:00:00 2001 From: Labanya Mukhopadhyay Date: Wed, 30 Mar 2022 13:46:16 -0700 Subject: [PATCH] FIX-#471: Update black version and pin click version (#472) * FIX-#464: Remove sh dependency Signed-off-by: Labanya Mukhopadhyay * remove subprocess sh in conf Signed-off-by: Labanya Mukhopadhyay * fixing black pre commit error Signed-off-by: Labanya Mukhopadhyay * FIX-#471: update black version and pin click version Signed-off-by: Labanya Mukhopadhyay * reformatted files with black Signed-off-by: Labanya Mukhopadhyay --- .pre-commit-config.yaml | 5 +++-- lux/vislib/altair/Histogram.py | 2 +- tests/test_type.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d1b54d30..51a04bc3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 22.3.0 hooks: - - id: black \ No newline at end of file + - id: black + additional_dependencies: ['click==8.0.4'] \ No newline at end of file diff --git a/lux/vislib/altair/Histogram.py b/lux/vislib/altair/Histogram.py index 868731d8..759a3cbe 100644 --- a/lux/vislib/altair/Histogram.py +++ b/lux/vislib/altair/Histogram.py @@ -131,5 +131,5 @@ def compute_bin_width(series): data = np.asarray(series) num_pts = data.size IQR = np.subtract(*np.percentile(data, [75, 25])) - size = 2 * IQR * (num_pts ** -1 / 3) + size = 2 * IQR * (num_pts**-1 / 3) return round(size * 3.5, 2) diff --git a/tests/test_type.py b/tests/test_type.py index 5395c661..bf95cb86 100644 --- a/tests/test_type.py +++ b/tests/test_type.py @@ -357,7 +357,7 @@ def test_id_music_data(): def test_id_absenteeism_data(): - """ Tests whether an id named column is not recognized because even though it is named an id, it is not with its nature. """ + """Tests whether an id named column is not recognized because even though it is named an id, it is not with its nature.""" df = pd.read_csv("https://github.com/lux-org/lux-datasets/blob/master/data/absenteeism.csv?raw=true") df.maintain_metadata() assert df.data_type == {