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

Fix transliteration and add types #84

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

Conversation

msopacua
Copy link

Transliteration was still in python2 mode and never upgraded. Since this module should no longer support python 2.x rewrite it to python 3.

Python 3's join() doesn't allow you to combine bytes and str, so we have to encode the delimiter as well.

Last but not least, document how translitcodec works, so we don't have to find this out the hard way.

Also type this module.
Utils are only used internally, but type them anyway as they can be referenced trough dotted notation in settings or people may import and use some of the functions here.

Chores:

  • Silence warnings on test runs
  • Upgrade coverage and no cover TYPE_CHECKING branch

Transliteration was still in python2 mode and never upgraded. Since
this module should no longer support python 2.x rewrite it to python 3.

Python 3's join() doesn't allow you to combine bytes and str, so we
have to encode the delimiter as well.

Last but not least, document how translitcodec works, so we don't have
to find this out the hard way.

Also type this module.
Utils are only used internally, but type them anyway as they can be
referenced trough dotted notation in settings or people may import and
use some of the functions here.
- Unfortunately coverage doesn't know about TYPE_CHECKING
- We don't care about delete's signature, so just use kwargs for
  forwards compatibility
- Upgrade coverage to latest
@msopacua
Copy link
Author

@justinmayer Do you want this fixed or since the code wasn't python3 compatible and no one complained since python2 died, remove it?

@justinmayer
Copy link
Owner

Even though I’m not aware of any complaints about it, I think the transliteration features could be useful enough to keep around if it’s not too much trouble. What do you think?

@paulocoutinhox
Copy link

+1

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.

3 participants