1. Line 116: escaped double quotes in raw string regex char classes
2. Lines 509-510: merged split string into single line
3. Line 524: moved global declaration to start of main()
The raw string regex for detecting file I/O in tests had an unclosed
parenthesis from open(. Added the closing ) to fix SyntaxError that
blocked pytest collection.