gpoulter / python-ngram

Python Set subclass that supports searching by ngram similarity
GNU Lesser General Public License v3.0
120 stars 24 forks source link

Deprecation warning due to invalid escape sequences in Python 3.7 #13

Closed tirkarthi closed 4 years ago

tirkarthi commented 4 years ago

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

 find . -iname '*.py' | grep -vE 'example|docs' | xargs -P 4 -I{} python3.8 -Wall -m py_compile {}
./scripts/csvjoin.py:18: DeprecationWarning: invalid escape sequence \s
  term = re.sub('\s+', ' ', term)
./ngram.py:23: DeprecationWarning: invalid escape sequence \ 
  """A set that supports searching for members by N-gram string similarity.