Commit 8f53872
committed
Speed up spellchecking by ignoring whitespace-only lines
Whitespace only lines cannot have typos in them at all on account of
not containing any words. Nevertheless, codespell did not exit early
on them causing quite some overhead.
By special-casing empty and whitespace only, it is possible to reduce
the runtime from ~5.4s to ~5.0s on the corpus mentioned in #3419.1 parent 73b7b5e commit 8f53872
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
949 | | - | |
| 949 | + | |
| 950 | + | |
950 | 951 | | |
951 | 952 | | |
952 | 953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
0 commit comments