Skip to content

Fix type warning for invalid escape in string#1003

Merged
xpconanfan merged 1 commit intogoogle:masterfrom
mbrukman:fix-escape-sequence
Apr 13, 2026
Merged

Fix type warning for invalid escape in string#1003
xpconanfan merged 1 commit intogoogle:masterfrom
mbrukman:fix-escape-sequence

Conversation

@mbrukman
Copy link
Copy Markdown
Member

This change will fix the following type checker warning:

mobly/controllers/attenuator_lib/telnet_scpi_client.py:73: SyntaxWarning: invalid escape sequence '\S'
  [_ascii_string("\S+" + self.rx_cmd_separator)], 1

@xpconanfan
Copy link
Copy Markdown
Collaborator

This seems to break presubmit tests on Windows

@mbrukman
Copy link
Copy Markdown
Member Author

@xpconanfan — the problem with that build is that installation of Python 3.11 is failing on Windows:

C:\tmpfs\src\github\mobly>choco install python311
Chocolatey v2.5.1
Installing the following packages:
python311
By installing, you accept licenses for the packages.
Unable to connect to source 'https://community.chocolatey.org/api/v2/':
Failed to fetch results from V2 feed at 'https://community.chocolatey.org/api/v2/Packages()?$filter=(tolower(Id)%20eq%20'python311')%20and%20IsLatestVersion&semVerLevel=2.0.0' with following message : Response status code does not indicate success: 499 ().
python311 not installed. The package was not found with the source(s) listed.

Error code 499 seems to be due to the client closing the connection while the server was still processing the request, so it may be worthwhile to just rerun that build to see if it succeeds on the next run.

I'll re-push the branch to re-trigger the build to see if that fixes it. If it doesn't, I will debug further.

This change will fix the following type checker warning:

```
mobly/controllers/attenuator_lib/telnet_scpi_client.py:73: SyntaxWarning: invalid escape sequence '\S'
  [_ascii_string("\S+" + self.rx_cmd_separator)], 1
```
@mbrukman mbrukman force-pushed the fix-escape-sequence branch from 5cbc68c to 2a2bd19 Compare April 13, 2026 16:00
@mbrukman
Copy link
Copy Markdown
Member Author

@xpconanfan — all tests passed upon rerun.

@xpconanfan xpconanfan merged commit b37ad6a into google:master Apr 13, 2026
9 checks passed
@mbrukman mbrukman deleted the fix-escape-sequence branch April 13, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants