mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
0f01f46e02
* Replace all basestring references with unicode `basestring` was a compatability type introduced by Cython to make dealing with utf-8 strings in Python2 easier. In Python3 it is equivalent to the unicode (or str) type. I replaced all references to basestring with unicode, since that was used elsewhere, but we could also just replace them with str, which shoudl also be equivalent. All tests pass locally. * Replace all references to unicode type with str Since we only support python3 this is simpler. * Remove all references to unicode type This removes all references to the unicode type across the codebase and replaces them with `str`, which makes it more drastic than the prior commits. In order to make this work importing `unicode_literals` had to be removed, and one explicit unicode literal also had to be removed (it is unclear why this is necessary in Cython with language level 3, but without doing it there were errors about implicit conversion). When `unicode` is used as a type in comments it was also edited to be `str`. Additionally `coding: utf8` headers were removed from a few files. |
||
---|---|---|
.. | ||
__init__.pxd | ||
__init__.py | ||
_dict_proxies.py | ||
_retokenize.pyi | ||
_retokenize.pyx | ||
_serialize.py | ||
doc.pxd | ||
doc.pyi | ||
doc.pyx | ||
graph.pxd | ||
graph.pyx | ||
morphanalysis.pxd | ||
morphanalysis.pyi | ||
morphanalysis.pyx | ||
span_group.pxd | ||
span_group.pyi | ||
span_group.pyx | ||
span.pxd | ||
span.pyi | ||
span.pyx | ||
token.pxd | ||
token.pyi | ||
token.pyx | ||
underscore.py |