Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johnosbb opened this issue Apr 1, 2023 · 3 comments
Open

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

johnosbb opened this issue Apr 1, 2023 · 3 comments
Assignees
Labels
bug: confirmed Bugs that were confirmed in triage. cat: maintenance Issues and PRs related to the maintenance of a module. priority: high Issues and PRs that should be resolved as soon as possible. status: wip Issues and PRs that are still a work in progress. type: fix Issues and PRs related to bugs. version: patch Issues and PRs with bug fixes belonging to the next patch release.

Comments

@johnosbb
Copy link

johnosbb commented Apr 1, 2023

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
Copy link

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 Nytelife26 added bug: unconfirmed Bugs that need to be reproduced. type: fix Issues and PRs related to bugs. priority: high Issues and PRs that should be resolved as soon as possible. version: patch Issues and PRs with bug fixes belonging to the next patch release. status: wip Issues and PRs that are still a work in progress. cat: maintenance Issues and PRs related to the maintenance of a module. labels Aug 7, 2023
@Nytelife26 Nytelife26 self-assigned this Aug 7, 2023
@Nytelife26 Nytelife26 added bug: confirmed Bugs that were confirmed in triage. and removed bug: unconfirmed Bugs that need to be reproduced. labels Aug 7, 2023
@Nytelife26
Copy link
Member

Nytelife26 commented Aug 7, 2023

@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
Copy link
Member

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

@Nytelife26 Nytelife26 added this to the 1.0.0 milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed Bugs that were confirmed in triage. cat: maintenance Issues and PRs related to the maintenance of a module. priority: high Issues and PRs that should be resolved as soon as possible. status: wip Issues and PRs that are still a work in progress. type: fix Issues and PRs related to bugs. version: patch Issues and PRs with bug fixes belonging to the next patch release.
Projects
None yet
Development

No branches or pull requests

3 participants