amperser / proselint

A linter for prose.
http://proselint.com
BSD 3-Clause "New" or "Revised" License
4.36k stars 179 forks source link

Simple sample program on readme page fails with KeyError: 'checks' #1348

Open johnosbb opened 1 year ago

johnosbb commented 1 year ago

import proselint

suggestions = proselint.tools.lint("This sentence is very unique")

Produces the following error:

suggestions = proselint.tools.lint("This sentence is very unique")

File "/home/me/anaconda3/lib/python3.9/site-packages/proselint/tools.py", line 240, in lint checks = get_checks(config) File "/home/me/anaconda3/lib/python3.9/site-packages/proselint/tools.py", line 142, in get_checks check_names = [key for (key, val) in options["checks"].items() if val] KeyError: 'checks'

dstieglitz commented 1 year ago

This should probably be done in the library but as a workaround you can do the following:

import proselint
from proselint import config

suggestions = proselint.tools.lint("This sentence is very unique", config=config.default)
Nytelife26 commented 1 year ago

@dstieglitz This workaround is quite helpful in determining the source of the problem, so thank you for that. I was able to verify the issue quickly and I'll be pushing a fix shortly.

Nytelife26 commented 7 months ago

Was this not fixed by #1246? I can no longer reproduce this issue.