Skip to content

Fix invalid escape sequences in holecircle and plasmac2 - #4536

Open
MBK-fr wants to merge 1 commit into
LinuxCNC:masterfrom
MBK-fr:fix/invalid-escape-sequence-syntaxwarning
Open

MBK-fr wants to merge 1 commit into
LinuxCNC:masterfrom
MBK-fr:fix/invalid-escape-sequence-syntaxwarning

Conversation

@MBK-fr

@MBK-fr MBK-fr commented Sep 14, 2026

Copy link
Copy Markdown

Problem

Two scripts use invalid escape sequences in non-raw string literals:

  • nc_files/holecircle.py - \.
  • configs/sim/axis/plasma/plasmac2/plasmac2.py - \O

On Python 3.12+ these raise SyntaxWarning: invalid escape sequence.

Fix

Escape the backslashes so each string value is byte-for-byte identical (ruff W605-style).

Verification

ast.dump unchanged per file; python3 -W error py_compile passes on both after, failed before.


🤖 Generated with Claude Code

https://claude.ai/code/session_014HBQNzAf5C2E3MiJC48HQw

nc_files/holecircle.py (`\.`) and
configs/sim/axis/plasma/plasmac2/plasmac2.py (`\O`) use invalid escape
sequences in non-raw string literals, which raise `SyntaxWarning:
invalid escape sequence` on Python 3.12+. Escaping the backslashes
keeps each string value identical (ruff W605-style).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HBQNzAf5C2E3MiJC48HQw
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.

1 participant