From bc67f66dc57b188ad383930ce099b771b0e25468 Mon Sep 17 00:00:00 2001 From: Rushabh Vasani <46084304+RushabhVasani@users.noreply.github.com> Date: Wed, 23 Oct 2019 22:43:47 +0530 Subject: [PATCH 01/11] solved type annotaiton problem --- pandas/tests/indexes/test_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 0dc6d24202c34..0276b87af7bd4 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -508,7 +508,7 @@ def test_constructor_dtypes_timedelta(self, attr, klass): result = klass(list(values), dtype=dtype) tm.assert_index_equal(result, index) - @pytest.mark.parametrize("value", [[], iter([]), (x for x in [])]) + @pytest.mark.parametrize("value", [[], iter([]), (_ for _ in [])]) @pytest.mark.parametrize( "klass", [ @@ -531,7 +531,7 @@ def test_constructor_empty(self, value, klass): [ (PeriodIndex([], freq="B"), PeriodIndex), (PeriodIndex(iter([]), freq="B"), PeriodIndex), - (PeriodIndex((x for x in []), freq="B"), PeriodIndex), + (PeriodIndex((_ for _ in []), freq="B"), PeriodIndex), (RangeIndex(step=1), pd.RangeIndex), (MultiIndex(levels=[[1, 2], ["blue", "red"]], codes=[[], []]), MultiIndex), ], From e7e1cabf0a45c59ba6a8dbad283dee75f0619f0b Mon Sep 17 00:00:00 2001 From: Rushabh Vasani <46084304+RushabhVasani@users.noreply.github.com> Date: Wed, 23 Oct 2019 22:47:59 +0530 Subject: [PATCH 02/11] Update setup.cfg --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index f7920fb61b942..e311e9ca5184e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -160,9 +160,6 @@ ignore_errors=True [mypy-pandas.tests.indexes.period.test_period] ignore_errors=True -[mypy-pandas.tests.indexes.test_base] -ignore_errors=True - [mypy-pandas.tests.indexes.test_category] ignore_errors=True From 73d34bae02afe966cbec4121efb1fd9dfcdf8839 Mon Sep 17 00:00:00 2001 From: Rushabh Vasani <46084304+RushabhVasani@users.noreply.github.com> Date: Fri, 25 Oct 2019 11:26:42 +0530 Subject: [PATCH 03/11] Update setup.cfg --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index e311e9ca5184e..7687d7fbe8822 100644 --- a/setup.cfg +++ b/setup.cfg @@ -160,6 +160,9 @@ ignore_errors=True [mypy-pandas.tests.indexes.period.test_period] ignore_errors=True +# [mypy-pandas.tests.indexes.test_base] +# ignore_errors=True + [mypy-pandas.tests.indexes.test_category] ignore_errors=True From fcddcfcda2de3306191067afe19bc86859665091 Mon Sep 17 00:00:00 2001 From: Rushabh Vasani <46084304+RushabhVasani@users.noreply.github.com> Date: Fri, 25 Oct 2019 11:28:43 +0530 Subject: [PATCH 04/11] removed comment --- setup.cfg | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7687d7fbe8822..e311e9ca5184e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -160,9 +160,6 @@ ignore_errors=True [mypy-pandas.tests.indexes.period.test_period] ignore_errors=True -# [mypy-pandas.tests.indexes.test_base] -# ignore_errors=True - [mypy-pandas.tests.indexes.test_category] ignore_errors=True From 27eef1eb4e0e9f7d8c14e600e5d365e19684b2bc Mon Sep 17 00:00:00 2001 From: Rushabh Vasani Date: Mon, 18 Nov 2019 14:51:03 +0530 Subject: [PATCH 05/11] merge branch master into 'master' --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index c70c6ea44a7b7..fa8b61a214cab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -152,4 +152,4 @@ ignore_errors=True ignore_errors=True [mypy-pandas.tests.series.test_operators] -ignore_errors=True \ No newline at end of file +ignore_errors=True From 092e0d7befb519837343c3b731e4b3b8cc2b2fa0 Mon Sep 17 00:00:00 2001 From: Rushabh Vasani Date: Tue, 19 Nov 2019 14:27:54 +0530 Subject: [PATCH 06/11] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 158d48898a7bd..80658c5775959 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@
------------------ - # pandas: powerful Python data analysis toolkit From e6d74982e8ad6b1edf4d93d7f9e650b39e52be17 Mon Sep 17 00:00:00 2001 From: Rushabh Vasani Date: Tue, 19 Nov 2019 14:31:25 +0530 Subject: [PATCH 07/11] revert the last change --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 80658c5775959..7aceb11de43ed 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@
+----------------- + + # pandas: powerful Python data analysis toolkit
From 07cc23fe2b7d934961badbf12675cbdad1a8a710 Mon Sep 17 00:00:00 2001 From: Rushabh Vasani Date: Tue, 19 Nov 2019 14:40:12 +0530 Subject: [PATCH 08/11] revert the mistake --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7aceb11de43ed..158d48898a7bd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ ----------------- - # pandas: powerful Python data analysis toolkit
From 32951cf7f3e57e2d76fff59aaf580618656a0a77 Mon Sep 17 00:00:00 2001 From: RushabhVasani Date: Wed, 27 Nov 2019 16:40:46 +0530 Subject: [PATCH 09/11] Add #type: ignore for the Slicing error --- pandas/tests/indexes/test_base.py | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 2c2187ec1507f..699a12d19a682 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -1732,23 +1732,23 @@ def test_slice_locs_na_raises(self): @pytest.mark.parametrize( "in_slice,expected", [ - (pd.IndexSlice[::-1], "yxdcb"), - (pd.IndexSlice["b":"y":-1], ""), - (pd.IndexSlice["b"::-1], "b"), - (pd.IndexSlice[:"b":-1], "yxdcb"), - (pd.IndexSlice[:"y":-1], "y"), - (pd.IndexSlice["y"::-1], "yxdcb"), - (pd.IndexSlice["y"::-4], "yb"), + (pd.IndexSlice[::-1], "yxdcb"), # type: ignore + (pd.IndexSlice["b":"y":-1], ""), # type: ignore + (pd.IndexSlice["b"::-1], "b"), # type: ignore + (pd.IndexSlice[:"b":-1], "yxdcb"), # type: ignore + (pd.IndexSlice[:"y":-1], "y"), # type: ignore + (pd.IndexSlice["y"::-1], "yxdcb"), # type: ignore + (pd.IndexSlice["y"::-4], "yb"), # type: ignore # absent labels - (pd.IndexSlice[:"a":-1], "yxdcb"), - (pd.IndexSlice[:"a":-2], "ydb"), - (pd.IndexSlice["z"::-1], "yxdcb"), - (pd.IndexSlice["z"::-3], "yc"), - (pd.IndexSlice["m"::-1], "dcb"), - (pd.IndexSlice[:"m":-1], "yx"), - (pd.IndexSlice["a":"a":-1], ""), - (pd.IndexSlice["z":"z":-1], ""), - (pd.IndexSlice["m":"m":-1], ""), + (pd.IndexSlice[:"a":-1], "yxdcb"), # type: ignore + (pd.IndexSlice[:"a":-2], "ydb"), # type: ignore + (pd.IndexSlice["z"::-1], "yxdcb"), # type: ignore + (pd.IndexSlice["z"::-3], "yc"), # type: ignore + (pd.IndexSlice["m"::-1], "dcb"), # type: ignore + (pd.IndexSlice[:"m":-1], "yx"), # type: ignore + (pd.IndexSlice["a":"a":-1], ""), # type: ignore + (pd.IndexSlice["z":"z":-1], ""), # type: ignore + (pd.IndexSlice["m":"m":-1], ""), # type: ignore ], ) def test_slice_locs_negative_step(self, in_slice, expected): From 75d71a00c7229cc2d4cf9632b897942c35ef6252 Mon Sep 17 00:00:00 2001 From: RushabhVasani Date: Wed, 27 Nov 2019 17:01:31 +0530 Subject: [PATCH 10/11] add spaces acc. to PEP 8 --- pandas/tests/indexes/test_base.py | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index 699a12d19a682..b74264c1f0420 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -1732,23 +1732,23 @@ def test_slice_locs_na_raises(self): @pytest.mark.parametrize( "in_slice,expected", [ - (pd.IndexSlice[::-1], "yxdcb"), # type: ignore - (pd.IndexSlice["b":"y":-1], ""), # type: ignore - (pd.IndexSlice["b"::-1], "b"), # type: ignore - (pd.IndexSlice[:"b":-1], "yxdcb"), # type: ignore - (pd.IndexSlice[:"y":-1], "y"), # type: ignore - (pd.IndexSlice["y"::-1], "yxdcb"), # type: ignore - (pd.IndexSlice["y"::-4], "yb"), # type: ignore + (pd.IndexSlice[::-1], "yxdcb"), # type: ignore + (pd.IndexSlice["b":"y":-1], ""), # type: ignore + (pd.IndexSlice["b"::-1], "b"), # type: ignore + (pd.IndexSlice[:"b":-1], "yxdcb"), # type: ignore + (pd.IndexSlice[:"y":-1], "y"), # type: ignore + (pd.IndexSlice["y"::-1], "yxdcb"), # type: ignore + (pd.IndexSlice["y"::-4], "yb"), # type: ignore # absent labels - (pd.IndexSlice[:"a":-1], "yxdcb"), # type: ignore - (pd.IndexSlice[:"a":-2], "ydb"), # type: ignore - (pd.IndexSlice["z"::-1], "yxdcb"), # type: ignore - (pd.IndexSlice["z"::-3], "yc"), # type: ignore - (pd.IndexSlice["m"::-1], "dcb"), # type: ignore - (pd.IndexSlice[:"m":-1], "yx"), # type: ignore - (pd.IndexSlice["a":"a":-1], ""), # type: ignore - (pd.IndexSlice["z":"z":-1], ""), # type: ignore - (pd.IndexSlice["m":"m":-1], ""), # type: ignore + (pd.IndexSlice[:"a":-1], "yxdcb"), # type: ignore + (pd.IndexSlice[:"a":-2], "ydb"), # type: ignore + (pd.IndexSlice["z"::-1], "yxdcb"), # type: ignore + (pd.IndexSlice["z"::-3], "yc"), # type: ignore + (pd.IndexSlice["m"::-1], "dcb"), # type: ignore + (pd.IndexSlice[:"m":-1], "yx"), # type: ignore + (pd.IndexSlice["a":"a":-1], ""), # type: ignore + (pd.IndexSlice["z":"z":-1], ""), # type: ignore + (pd.IndexSlice["m":"m":-1], ""), # type: ignore ], ) def test_slice_locs_negative_step(self, in_slice, expected): From 559913100cdbf32d3cd4f9fc1710db179d56a916 Mon Sep 17 00:00:00 2001 From: RushabhVasani Date: Wed, 27 Nov 2019 17:35:19 +0530 Subject: [PATCH 11/11] remove unwanted --- pandas/tests/indexes/test_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index b74264c1f0420..9d6dc3e906dff 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -1732,7 +1732,7 @@ def test_slice_locs_na_raises(self): @pytest.mark.parametrize( "in_slice,expected", [ - (pd.IndexSlice[::-1], "yxdcb"), # type: ignore + (pd.IndexSlice[::-1], "yxdcb"), (pd.IndexSlice["b":"y":-1], ""), # type: ignore (pd.IndexSlice["b"::-1], "b"), # type: ignore (pd.IndexSlice[:"b":-1], "yxdcb"), # type: ignore