jmsv / ety-python

A Python module to discover the etymology of words
http://ety-python.rtfd.io
MIT License
144 stars 18 forks source link

Fix escape characters #51

Closed alxwrd closed 5 years ago

alxwrd commented 5 years ago

Pytest is picking up the following as warnings.

============================== warnings summary ===============================
C:\Users\Alex\Repos\ety-python\ety\census.py:17: DeprecationWarning: invalid escape sequence \s
  words = list(re.split("\s+", words))  # Split words by whitespace

C:\Users\Alex\Repos\ety-python\ety\census.py:31: DeprecationWarning: invalid escape sequence \
  be ety.Word objects or strings"

This fixes up these 2 strings.

codecov[bot] commented 5 years ago

Codecov Report

Merging #51 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #51   +/-   ##
=======================================
  Coverage   92.58%   92.58%           
=======================================
  Files           8        8           
  Lines         310      310           
=======================================
  Hits          287      287           
  Misses         23       23
Impacted Files Coverage Δ
ety/census.py 92.85% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 886002d...e4cd4fb. Read the comment docs.

jmsv commented 5 years ago

Code looks better although checking older Travis builds I can't see these warnings - do you have a link to an example?

alxwrd commented 5 years ago

I can't see anything in Travis either! Apart from my output from running pytest I'm not sure:

λ pipenv run python -m pytest tests.py
Warning: Your Pipfile requires python_version 3.6, but you are using 3.7.0 (C:\Users\Alex\.\e\S\python.exe).
  $ pipenv check will surely fail.
============================= test session starts =============================
platform win32 -- Python 3.7.0, pytest-3.8.1, py-1.6.0, pluggy-0.7.1
rootdir: C:\Users\Alex\Repos\ety-python, inifile:
collected 18 items

tests.py ..................                                              [100%]

============================== warnings summary ===============================
C:\Users\Alex\Repos\ety-python\ety\census.py:17: DeprecationWarning: invalid escape sequence \s
  words = list(re.split("\s+", words))  # Split words by whitespace

C:\Users\Alex\Repos\ety-python\ety\census.py:31: DeprecationWarning: invalid escape sequence \
  be ety.Word objects or strings"

C:\Users\Alex\.virtualenvs\ety-python-UxwL2WCR\lib\site-packages\pycodestyle.py:113: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
C:\Users\Alex\.virtualenvs\ety-python-UxwL2WCR\lib\site-packages\flake8\plugins\manager.py:410: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  isinstance(method, collections.Callable)):
:17: DeprecationWarning: invalid escape sequence \s
:31: DeprecationWarning: invalid escape sequence \

-- Docs: https://docs.pytest.org/en/latest/warnings.html
==================== 18 passed, 6 warnings in 0.81 seconds ====================