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

Pluralize issues with patterns #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

janbalaz
Copy link

PLURALIZE_PATTERNS in utils.py have multiple issues:

  1. missing group catching in one pattern
  2. raising group unmatched error

Issue 1. is pretty obvious, forgotten slash here: (r'(hive)$', r'1s').

Issue 2. will happen with Python versions below 3.5 because of the following issue:
Unmatched Group issue - workaround

I'm no expert on regex, unfortunately, so I just split offending pattern in two separate. That seems to fix the issue but adds duplicity. Anyone more experienced might try to find a better solution.

I added tests and run on Python 2.7.
Please let me know if there are any problems with this pull request or point me to some docs for contributors. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant