trex-core icon indicating copy to clipboard operation
trex-core copied to clipboard

Fix invalid escape sequences

Open fperrin opened this issue 5 years ago • 5 comments

Hi,

When running under Python3, we get a number of DeprecationWarning: invalid escape sequence warnings. This pull-request fixes these. I tried following the convention of using the raw-string r"" prefix for regexp strings, or extra backslashes for other strings.

To avoid more of these creeping in, running pycodestyle --select=W6 . from the top of the code repository will flag this error.

fperrin avatar Nov 26 '19 12:11 fperrin

Checked SHA: 9da35c6c58cf7c3e2b454490ddaee752c1484059 Status: FAILURE :x: Link to job: http://81.218.86.50:8080/job/trex_build/221/

trex-bot avatar Nov 26 '19 12:11 trex-bot

Since there is already a self-test for syntax; I could add a test running pycodestyle, assuming an extra dependency on that package is okay.

fperrin avatar Nov 26 '19 14:11 fperrin

Checked SHA: 0deadd9c2ce7e5969e47d53d636d25a60189ccde Status: SUCCESS :heavy_check_mark: Link to job: http://81.218.86.50:8080/job/trex_build/222/

trex-bot avatar Nov 26 '19 15:11 trex-bot

Are you running Python with warnings switch in order to produce described results?

ybrustin avatar Nov 27 '19 09:11 ybrustin

Yes. More exactly I use pytest and Python3 to drive TRex, and I thing pytest forces recompilation of Python module files every time it runs.

fperrin avatar Nov 27 '19 13:11 fperrin