Skip to content

Commit 66c1b18

Browse files
committed
strip() instead of strip(" ")
1 parent 5dbed37 commit 66c1b18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

numpydoc/numpydoc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,11 @@ def match_items(lines, content_old):
200200
j = 0
201201
for i, line in enumerate(lines):
202202
# go to next non-empty line in old:
203-
# line.strip("") checks whether the string is all whitespace
204-
while j < len(lines_old) - 1 and not lines_old[j].strip(" "):
203+
# line.strip() checks whether the string is all whitespace
204+
while j < len(lines_old) - 1 and not lines_old[j].strip():
205205
j += 1
206206
items_new.append(items_old[j])
207-
if line.strip(" ") and j < len(lines_old) - 1:
207+
if line.strip() and j < len(lines_old) - 1:
208208
j += 1
209209
assert(len(items_new) == len(lines))
210210
return items_new

0 commit comments

Comments
 (0)