Skip to content

Commit

Permalink
chore: Use text-unidecode instead of unidecode package to fix license…
Browse files Browse the repository at this point in the history
… incompatibility (#2168)

* Use text-unidecode instead of unidecode package to fix license incompatibility

Signed-off-by: Kristen Armes <[email protected]>

* Ignore incorrect error on None type

Signed-off-by: Kristen Armes <[email protected]>

* Addressing PR feedback

Signed-off-by: Kristen Armes <[email protected]>

---------

Signed-off-by: Kristen Armes <[email protected]>
  • Loading branch information
kristenarmes authored Jun 14, 2023
1 parent 1c74bac commit 13a6996
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)

from pyhocon import ConfigFactory, ConfigTree
from unidecode import unidecode
from text_unidecode import unidecode

from databuilder.extractor import sql_alchemy_extractor
from databuilder.extractor.base_extractor import Extractor
Expand Down
8 changes: 4 additions & 4 deletions databuilder/databuilder/utils/hive_complex_type_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Scalar types
union_list = delimitedList(field_type)
union_type = nestedExpr(
opener=union_keyword + "<", closer=">", content=union_list, ignoreExpr=None
opener=union_keyword + "<", closer=">", content=union_list, ignoreExpr=None # type: ignore
)
scalar_quantifier = "(" + Word(nums) + Optional(")" | "," + Word(nums) + ")")
scalar_type = union_type | OneOrMore(Word(alphanums + "_")) + Optional(scalar_quantifier)
Expand All @@ -34,13 +34,13 @@
struct_field = field_name("name") + ":" + field_type("type")
struct_list = delimitedList(Group(struct_field))
array_type = nestedExpr(
opener=array_keyword, closer=">", content=array_field, ignoreExpr=None
opener=array_keyword, closer=">", content=array_field, ignoreExpr=None # type: ignore
)
map_type = nestedExpr(
opener=map_keyword + "<", closer=">", content=map_field, ignoreExpr=None
opener=map_keyword + "<", closer=">", content=map_field, ignoreExpr=None # type: ignore
)
struct_type = nestedExpr(
opener=struct_keyword + "<", closer=">", content=struct_list, ignoreExpr=None
opener=struct_keyword + "<", closer=">", content=struct_list, ignoreExpr=None # type: ignore
)

field_type <<= originalTextFor(array_type | map_type | struct_type | scalar_type)
Expand Down
6 changes: 3 additions & 3 deletions databuilder/databuilder/utils/trino_complex_type_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
struct_field = field_name("name") + field_type("type")
struct_list = delimitedList(Group(struct_field))
array_type = nestedExpr(
opener=array_keyword, closer=")", content=array_field, ignoreExpr=None
opener=array_keyword, closer=")", content=array_field, ignoreExpr=None # type: ignore
)
map_type = nestedExpr(
opener=map_keyword + "(", closer=")", content=map_field, ignoreExpr=None
opener=map_keyword + "(", closer=")", content=map_field, ignoreExpr=None # type: ignore
)
struct_type = nestedExpr(
opener=struct_keyword + "(", closer=")", content=struct_list, ignoreExpr=None
opener=struct_keyword + "(", closer=")", content=struct_list, ignoreExpr=None # type: ignore
)

field_type <<= originalTextFor(array_type | map_type | struct_type | scalar_type)
Expand Down
2 changes: 1 addition & 1 deletion databuilder/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ statsd>=3.2.1
retrying>=1.3.3
unicodecsv>=0.14.1,<1.0
httplib2>=0.18.0
unidecode
text-unidecode>=1.3
Jinja2>=2.10.0,<4
pandas>=0.21.0,<1.5.0
responses>=0.10.6
Expand Down
2 changes: 1 addition & 1 deletion databuilder/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from setuptools import find_packages, setup

__version__ = '7.4.3'
__version__ = '7.4.4'

requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'requirements.txt')
Expand Down

0 comments on commit 13a6996

Please sign in to comment.