Closed mlutze closed 8 months ago
Thanks for your work on this. Just to avoid a misunderstanding: I wont review this PR while it is marked as draft.
Thanks for your work on this. Just to avoid a misunderstanding: I wont review this PR while it is marked as draft.
Understood. There are still some changes to testing and documentation I'd like to make before submitting for review.
@MiWeiss This is ready for review.
Thanks again @mlutze for your PR, and sorry that the review took so long!
I added a flag to
MergeNameParts
so the user can decide whether to use first-name-first or last-name-first. I made last-name-first the default.I slightly modified one existing test group to support the flag.
I added a new test group
test_merge_last_name_first_inverse
which ensures that merging with commas is the inverse of splitting. I skip this test for cases including a/
, since this property doesn't hold for some of those cases.I also had to do a bit of strange stuff with the typing imports. The flag I added is a union of literal strings, but literal string types aren't available in Python 3.7. So I try importing a literal type and if that doesn't work then I just say the type of the flag is "str", which is too general but the closest I can get