Skip to content

Commit cbd3898

Browse files
authored
Merge pull request #44 from jcfr/introduce-contraction-constants
STYLE: Introduce constant to list checked contractions
2 parents 2a0ed3e + 91ec622 commit cbd3898

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

codespell.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
}
3838

3939

40+
CONTRACTIONS = ["'d", "'s", "'th"]
41+
42+
4043
def splitCamelCase(word):
4144
"""Split a camel case string into individual words."""
4245

@@ -112,7 +115,7 @@ def spell_check_comment(
112115
valid = False
113116

114117
# Check for contractions
115-
for contraction in ["'d", "'s", "'th"]:
118+
for contraction in CONTRACTIONS:
116119
if error_word.endswith(contraction):
117120
original_error_word = error_word
118121
error_word = error_word[: -len(contraction)]

0 commit comments

Comments
 (0)