Closed Morilli closed 2 weeks ago
This fixes some SyntaxWarnings from new(er) python versions on non-raw strings used in re. contexts.
SyntaxWarning
re.
$ python3 --version 3.12.4
e.g.
COMMAND_LINE=--arch x64 --release-type retail --root-sol magisk --magisk-ver stable --install-gapps --remove-amazon INFO: Architecture: x64 INFO: Release Type: retail INFO: Magisk Version: stable INFO: Root Solution: magisk INFO: Compress Format: none INFO: Release Name: Retail Generating WSA Download Links /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:148: SyntaxWarning: invalid escape sequence '\.' if re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:150: SyntaxWarning: invalid escape sequence '\d' u'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group() /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:156: SyntaxWarning: invalid escape sequence '\.' if re.match(f"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:156: SyntaxWarning: invalid escape sequence '\.' if re.match(f"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:159: SyntaxWarning: invalid escape sequence '\.' elif re.match(f"Microsoft\.VCLibs\..+\.UWPDesktop_.*_{arch}_.*\.appx", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:159: SyntaxWarning: invalid escape sequence '\.' elif re.match(f"Microsoft\.VCLibs\..+\.UWPDesktop_.*_{arch}_.*\.appx", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:162: SyntaxWarning: invalid escape sequence '\.' elif re.match(f"Microsoft\.VCLibs\..+_.*_{arch}_.*\.appx", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:162: SyntaxWarning: invalid escape sequence '\.' elif re.match(f"Microsoft\.VCLibs\..+_.*_{arch}_.*\.appx", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:165: SyntaxWarning: invalid escape sequence '\.' elif not skip_wsa_download and re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename): /mnt/d/GitHub/MagiskOnWSALocal/scripts/generateWSALinks.py:167: SyntaxWarning: invalid escape sequence '\d' u'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group() Generating WSA download link: arch=x64 release_type=Retail ...
I'm not sure if these invalid sequences actually affect the result, but it's best to fix them anyway.
This fixes some
SyntaxWarning
s from new(er) python versions on non-raw strings used inre.
contexts.e.g.
I'm not sure if these invalid sequences actually affect the result, but it's best to fix them anyway.