Skip to content

Deprecation warning due to invalid escape sequences #995

@tirkarthi

Description

@tirkarthi

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/

m = re.search("^\s+([a-zA-Z0-9_]+): (.*)", line)

python -Wall -m py_compile describe.py
describe.py:203: DeprecationWarning: invalid escape sequence \s
  m = re.search('^\s+([a-zA-Z0-9_]+): (.*)', line)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions