Skip to content

Silence Python invalid escape sequence warnings by turning some strings into raw strings #1

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -3623,7 +3623,7 @@ windows_coverage_env = windows_debug_env.Clone(
# needed.
MANIFEST_FILE = None,
COVERAGE_ANALYZER_DIR=r'..\third_party\coverage_analyzer\bin',
COVERAGE_ANALYZER='$COVERAGE_ANALYZER_DIR\coverage_analyzer.exe',
COVERAGE_ANALYZER=r'$COVERAGE_ANALYZER_DIR\coverage_analyzer.exe',
)
# TODO(bradnelson): Switch nacl to common testing process so this won't be
# needed. Ignoring instrumentation failure as that's easier
Expand Down
2 changes: 1 addition & 1 deletion site_scons/site_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def BuildEnvironmentSConscripts(env):
else:
raise SCons.Errors.UserError(
'Bad location for a SConscript. "%s" is not under '
'\$TARGET_ROOT or \$MAIN_DIR' % c_script)
r'\$TARGET_ROOT or \$MAIN_DIR' % c_script)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe in this one, the backslashes are actually not wanted in the output and should be removed instead.


def UsingNaclMode():
build_modes = SCons.Script.ARGUMENTS.get('MODE') or SCons.Script.GetOption('build_mode')
Expand Down
2 changes: 1 addition & 1 deletion src/trusted/service_runtime/build.scons
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ if env.Bit('build_x86_64'):

if env.Bit('build_x86') and env.Bit('nacl_static_link'):
RE_HELLO = '^(Hello, World!)$'
RE_IDENT = '^\[[0-9,:.]*\] (e_ident\+1 = ELF)$'
RE_IDENT = r'^\[[0-9,:.]*\] (e_ident\+1 = ELF)$'

node = env.CommandSelLdrTestNacl(
'nacl_log.out',
Expand Down
2 changes: 1 addition & 1 deletion tools/command_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def GetNaClSignalInfoFromStderr(stderr):

# Scan for signal msg in reverse order
for curline in reversed(lines):
match = re.match('\*\* (Signal|Mach exception) (\d+) from '
match = re.match(r'\*\* (Signal|Mach exception) (\d+) from '
'(trusted|untrusted) code', str(curline))
if match is not None:
return match.group(0)
Expand Down