sdispater / clikit

CliKit is a group of utilities to build beautiful and testable command line interfaces.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DeprecationWarning: invalid escape sequence

kbaikov opened this issue · comments

I get the following error message on first poetry start if env variable is set: PYTHONWARNINGS = default

PS C:\Users\username> poetry --version
C:\Users\username\.poetry\lib\poetry\_vendor\py3.9\clikit\utils\string.py:81: DeprecationWarning: invalid escape sequence \s
  words = re.split("\s+", string)
C:\Users\username\.poetry\lib\poetry\_vendor\py3.9\clikit\api\args\format\command_option.py:47: DeprecationWarning: invalid escape sequence \-
  if not re.match("^[a-zA-Z0-9\-]+$", alias):
Poetry version 1.1.3

Poetry version 1.1.3
Poetry installed on windows 10 using get-poetry.py script.
Python version 3.9 (reproducible in 3.8)

I can propose a fix by escaping the escape slash, or by declaring the sting raw.
What would be a better approach?

The warnings seem to have been fixed with a84c056