Page MenuHomePhabricator

global: make some docstrings raw strings
ClosedPublic

Authored by indygreg on Feb 4 2019, 12:18 PM.

Details

Summary

Python 3.8 emits a SyntaxWarning when a str/bytes contains invalid
\ escapes. Various docstrings in our code base contain invalid
\ escapes.

This commit turns those docstrings into raw strings.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Feb 4 2019, 12:18 PM
This revision was automatically updated to reflect the committed changes.
pulkit added a subscriber: pulkit.Feb 5 2019, 4:40 AM

Should we add # skip-blame to this and rest of the series as they are just adding of r'' prefixes?

In D5816#85618, @pulkit wrote:

Should we add # skip-blame to this and rest of the series as they are just adding of r'' prefixes?

I'm not sure. If there are \ in the string, adding the r'' can change the value of the string. If we introduce a bug through these changes, using skip-blame will make it harder to find that change. It's probably safe to do though, as we should be able to count on review to find any meaningful value changes.