-
Notifications
You must be signed in to change notification settings - Fork 3
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
Wrong prep #62
base: master
Are you sure you want to change the base?
Wrong prep #62
Conversation
with countries
src/reynir_correct/pattern.py
Outdated
given a set of variants""" | ||
|
||
# Get rid of argument variants in verbs: | ||
variants = list([x for x in variants if not x.isdigit()]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either list() or [] are superfluous, only one of the two is required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...in fact the isdigit() filter is done twice. This could be:
realvars = [x for x in variants if not x.isdigit() and x not in SKIPVARS]
entirely dropping the for loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, done!
Handling for wrong prepositions.