Skip to content

Commit 75c1b96

Browse files
authored
CLN: Enable codespell for all files (#51804)
* CLN: enable codespell for all files * Fix for all files * Add cython and c * add ignore words list
1 parent b1c6622 commit 75c1b96

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repos:
4242
rev: v2.2.2
4343
hooks:
4444
- id: codespell
45-
types_or: [python, rst, markdown]
45+
types_or: [python, rst, markdown, cython, c]
4646
additional_dependencies: [tomli]
4747
- repo: https://github.com/MarcoGorelli/cython-lint
4848
rev: v0.12.5

pandas/_libs/hashing.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def hash_object_array(
5555
char **vecs
5656
char *cdata
5757
object val
58-
list datas = []
58+
list data_list = []
5959

6060
k = <bytes>key.encode(encoding)
6161
kb = <uint8_t *>k
@@ -97,7 +97,7 @@ def hash_object_array(
9797

9898
# keep the references alive through the end of the
9999
# function
100-
datas.append(data)
100+
data_list.append(data)
101101
vecs[i] = cdata
102102

103103
result = np.empty(n, dtype=np.uint64)

pandas/_libs/lib.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,7 @@ def maybe_convert_objects(ndarray[object] objects,
26502650
seen.object_ = True
26512651

26522652
if not convert_numeric:
2653-
# Note: we count "bool" as numeric here. This is becase
2653+
# Note: we count "bool" as numeric here. This is because
26542654
# np.array(list_of_items) will convert bools just like it will numeric
26552655
# entries.
26562656
return objects

pandas/_libs/missing.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cdef:
5252
cpdef bint check_na_tuples_nonequal(object left, object right):
5353
"""
5454
When we have NA in one of the tuples but not the other we have to check here,
55-
because our regular checks fail before with ambigous boolean value.
55+
because our regular checks fail before with ambiguous boolean value.
5656
5757
Parameters
5858
----------

pandas/_libs/src/parser/tokenizer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ char* _str_copy_decimal_str_c(const char *s, char **endpos, char decimal,
18281828
double round_trip(const char *p, char **q, char decimal, char sci, char tsep,
18291829
int skip_trailing, int *error, int *maybe_int) {
18301830
// 'normalize' representation to C-locale; replace decimal with '.' and
1831-
// remove t(housand)sep.
1831+
// remove thousands separator.
18321832
char *endptr;
18331833
char *pc = _str_copy_decimal_str_c(p, &endptr, decimal, tsep);
18341834
// This is called from a nogil block in parsers.pyx

pandas/_libs/src/ujson/lib/ultrajson.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ typedef struct __JSONObjectEncoder {
187187
size_t *_outLen);
188188

189189
/*
190-
Begin iteration of an iteratable object (JS_ARRAY or JS_OBJECT)
190+
Begin iteration of an iterable object (JS_ARRAY or JS_OBJECT)
191191
Implementor should setup iteration state in ti->prv
192192
*/
193193
JSPFN_ITERBEGIN iterBegin;
@@ -199,7 +199,7 @@ typedef struct __JSONObjectEncoder {
199199
JSPFN_ITERNEXT iterNext;
200200

201201
/*
202-
Ends the iteration of an iteratable object.
202+
Ends the iteration of an iterable object.
203203
Any iteration state stored in ti->prv can be freed here
204204
*/
205205
JSPFN_ITEREND iterEnd;

pandas/_libs/testing.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ cpdef assert_almost_equal(a, b,
187187
return True
188188

189189
if isna(a) and not isna(b) or not isna(a) and isna(b):
190-
# boolean value of pd.NA is ambigous
190+
# boolean value of pd.NA is ambiguous
191191
raise AssertionError(f"{a} != {b}")
192192

193193
if a == b:

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ cdef class _Timedelta(timedelta):
11061106

11071107
def total_seconds(self) -> float:
11081108
"""Total seconds in the duration."""
1109-
# We need to override bc we overrided days/seconds/microseconds
1109+
# We need to override bc we overrode days/seconds/microseconds
11101110
# TODO: add nanos/1e9?
11111111
return self.days * 24 * 3600 + self.seconds + self.microseconds / 1_000_000
11121112

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,7 +2344,7 @@ default 'raise'
23442344
Monday == 1 ... Sunday == 7.
23452345
"""
23462346
# same as super().isoweekday(), but that breaks because of how
2347-
# we have overriden year, see note in create_timestamp_from_ts
2347+
# we have overridden year, see note in create_timestamp_from_ts
23482348
return self.weekday() + 1
23492349

23502350
def weekday(self):
@@ -2354,7 +2354,7 @@ default 'raise'
23542354
Monday == 0 ... Sunday == 6.
23552355
"""
23562356
# same as super().weekday(), but that breaks because of how
2357-
# we have overriden year, see note in create_timestamp_from_ts
2357+
# we have overridden year, see note in create_timestamp_from_ts
23582358
return ccalendar.dayofweek(self.year, self.month, self.day)
23592359

23602360

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ ignore = [
273273
"PLR2004",
274274
# Outer loop variable overwritten by inner assignment
275275
"PLW2901",
276-
# Consider `elif` instead of `else` then `if` to remove indendation level
276+
# Consider `elif` instead of `else` then `if` to remove indentation level
277277
"PLR5501",
278278
]
279279

@@ -607,5 +607,5 @@ exclude_lines = [
607607
directory = "coverage_html_report"
608608

609609
[tool.codespell]
610-
ignore-words-list = "blocs, coo, hist, nd, sav, ser, recuse"
610+
ignore-words-list = "blocs, coo, hist, nd, sav, ser, recuse, nin, timere"
611611
ignore-regex = 'https://([\w/\.])+'

0 commit comments

Comments
 (0)