From 7d65668c35b3a3ef4b50f331c10c17a7e5e52223 Mon Sep 17 00:00:00 2001 From: Brock Date: Thu, 10 Sep 2020 13:49:29 -0700 Subject: [PATCH 1/2] typo cleanups --- pandas/_libs/index.pyx | 2 +- pandas/tests/arrays/categorical/test_indexing.py | 2 +- scripts/validate_unwanted_patterns.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/_libs/index.pyx b/pandas/_libs/index.pyx index 569562f5b5037..8155e7e6c074a 100644 --- a/pandas/_libs/index.pyx +++ b/pandas/_libs/index.pyx @@ -260,7 +260,7 @@ cdef class IndexEngine: def get_indexer_non_unique(self, targets): """ Return an indexer suitable for taking from a non unique index - return the labels in the same order ast the target + return the labels in the same order as the target and a missing indexer into the targets (which correspond to the -1 indices in the results """ diff --git a/pandas/tests/arrays/categorical/test_indexing.py b/pandas/tests/arrays/categorical/test_indexing.py index abfae189bb4d7..ab8606ef9258d 100644 --- a/pandas/tests/arrays/categorical/test_indexing.py +++ b/pandas/tests/arrays/categorical/test_indexing.py @@ -183,7 +183,7 @@ def test_get_indexer_non_unique(self, idx_values, key_values, key_class): # GH 21448 key = key_class(key_values, categories=range(1, 5)) # Test for flat index and CategoricalIndex with same/different cats: - for dtype in None, "category", key.dtype: + for dtype in [None, "category", key.dtype]: idx = Index(idx_values, dtype=dtype) expected, exp_miss = idx.get_indexer_non_unique(key_values) result, res_miss = idx.get_indexer_non_unique(key) diff --git a/scripts/validate_unwanted_patterns.py b/scripts/validate_unwanted_patterns.py index 1a6d8cc8b9914..24d92ed155d71 100755 --- a/scripts/validate_unwanted_patterns.py +++ b/scripts/validate_unwanted_patterns.py @@ -357,9 +357,9 @@ def main( output_format : str Output format of the error message. file_extensions_to_check : str - Coma seperated values of what file extensions to check. + Comma seperated values of what file extensions to check. excluded_file_paths : str - Coma seperated values of what file paths to exclude during the check. + Comma seperated values of what file paths to exclude during the check. Returns ------- @@ -444,7 +444,7 @@ def main( parser.add_argument( "--included-file-extensions", default="py,pyx,pxd,pxi", - help="Coma seperated file extensions to check.", + help="Comma seperated file extensions to check.", ) parser.add_argument( "--excluded-file-paths", From e328cff3c3856f919c7243a6c4ef3d075a5d09bd Mon Sep 17 00:00:00 2001 From: Brock Date: Fri, 11 Sep 2020 07:38:30 -0700 Subject: [PATCH 2/2] typo fixup --- scripts/validate_unwanted_patterns.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/validate_unwanted_patterns.py b/scripts/validate_unwanted_patterns.py index 24d92ed155d71..2add2b8c62a4e 100755 --- a/scripts/validate_unwanted_patterns.py +++ b/scripts/validate_unwanted_patterns.py @@ -357,9 +357,9 @@ def main( output_format : str Output format of the error message. file_extensions_to_check : str - Comma seperated values of what file extensions to check. + Comma separated values of what file extensions to check. excluded_file_paths : str - Comma seperated values of what file paths to exclude during the check. + Comma separated values of what file paths to exclude during the check. Returns ------- @@ -444,7 +444,7 @@ def main( parser.add_argument( "--included-file-extensions", default="py,pyx,pxd,pxi", - help="Comma seperated file extensions to check.", + help="Comma separated file extensions to check.", ) parser.add_argument( "--excluded-file-paths",