Skip to content

Commit

Permalink
[BUG] Rules processing updated; uppercase letters prevented matching (#4
Browse files Browse the repository at this point in the history
). Version update.

#4
  • Loading branch information
alexeyev committed Feb 25, 2023
1 parent 85233e3 commit c4acba7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pytrovich/maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def find_in_rule_bean_list(rule_bean_list: list, gender: Gender, original_name:

result = None
done = False
testable_name = original_name.lower()

if rule_bean_list is not None:
# traversing all rules available
Expand All @@ -90,7 +91,7 @@ def find_in_rule_bean_list(rule_bean_list: list, gender: Gender, original_name:
# traversing all available checks for word ends
for test in rule_bean.test:
# if match found
if original_name.endswith(test):
if testable_name.endswith(test):
# if angrogynous OR gender match -- we're done, escaping both loops
if rule_bean.gender == Gender.ANDROGYNOUS.str() or rule_bean.gender == gender.str():
result = rule_bean
Expand Down
2 changes: 1 addition & 1 deletion pytrovich/meta.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

package = "pytrovich"
version = "0.0.3"
version = "0.0.4"
authors = ["Anton Alekseev"]
authors_string = ", ".join(authors)
emails = ["anton.m.alexeyev@gmail.com"]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
setup(
name="pytrovich",
packages=setuptools.find_packages(),
version="0.0.3",
version="0.0.4",
description="pytrovich: a Python port of an inflector for Russian anthroponyms developed by petrovich team: "
"https://github.com/petrovich",
long_description=long_description,
Expand Down

0 comments on commit c4acba7

Please sign in to comment.