Skip to content

Conversation

illwieckz
Copy link
Member

Silence such kind of warnings:

site_init:132: SyntaxWarning: invalid escape sequence '\$'
scons: Reading SConscript files ...
native_client/SConstruct:3626: SyntaxWarning: invalid escape sequence '\c'
  COVERAGE_ANALYZER='$COVERAGE_ANALYZER_DIR\coverage_analyzer.exe',
native_client/tools/command_tester.py:359: SyntaxWarning: invalid escape sequence '\*'
  match = re.match('\*\* (Signal|Mach exception) (\d+) from '
native_client/src/trusted/service_runtime/build.scons:827: SyntaxWarning: invalid escape sequence '\['
  RE_IDENT = '^\[[0-9,:.]*\] (e_ident\+1 = ELF)$'

It makes it easier to read error logs by not being confused by such warning noise.

@illwieckz illwieckz changed the title Silence Python unknown escape sequence warnings by turning some strings into raw strings Silence Python invalid escape sequence warnings by turning some strings into raw strings Apr 7, 2025
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.

Copy link
Member

Choose a reason for hiding this comment

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

I fixed this.

@slipher slipher merged commit 9be8f24 into master Oct 12, 2025
@slipher slipher deleted the illwieckz/python branch October 12, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants