Debian Codegraph @

proselint/checks/spelling/ve_of.py

raw
1 """-ve vs. -of."""
2
3 from proselint.tools import memoize, preferred_forms_check
4
5
6 @memoize
7 def check(text):
8 """-ve vs. -of."""
9 err = "spelling.ve_of"
10 msg = "-ve vs. -of. '{}' is the preferred spelling."
11
12 preferences = [
13
14 ["could've", ["could of"]],
15 ["should've", ["should of"]],
16 ["would've", ["would of"]],
17 ]
18
19 return preferred_forms_check(text, preferences, err, msg)