py-readability-metrics
py-readability-metrics copied to clipboard
DeprecationWarning: invalid escape sequence '\134/'
I am receiving the following deprecation warning (macOS, Python v3.11, py-readability-metrics v1.4.5):
.../readability/text/analyzer.py:132: DeprecationWarning: invalid escape sequence '\134/'
match = re.match('^[.,\134/#!$%\134'\134^&\134*;:{}=\134-_`~()]$', token)
I think the problem is that the character \134
is supposed to represent an escape sequence, but it's invalid in this context. This could be fixed using something like:
match = re.match(r'^[.,\\\/#!$%\^&\*;:{}=\-_`~()]$', token)