fix "invalid escape sequence" errors by amakea · Pull Request #576 · weechat/scripts
Script info
- Script name: twitch
- Version: 1.0.1
- Requirements:
- Min WeeChat version:
- Script tags:
Description
When loading up the latest version of twitch.py in weechat I am given the following errors...
python: stdout/stderr (?): /home/user/.local/share/weechat/python/twitch.py:356: SyntaxWarning: invalid escape sequence '\s'
python: stdout/stderr (?): bn=tags['ban-reason'].replace('\s',' ')
python: stdout/stderr (?): /home/user/.local/share/weechat/python/twitch.py:364: SyntaxWarning: invalid escape sequence '\s'
python: stdout/stderr (?): bn=tags['ban-reason'].replace('\s',' ')
python: stdout/stderr (?): /home/user/.local/share/weechat/python/twitch.py:461: SyntaxWarning: invalid escape sequence '\s'
python: stdout/stderr (?): msg = tags['system-msg'].replace('\s',' ')
I made some minor changes to make them go away.
Checklist (new script)
- Single commit, single file added
- Commit message:
New script name.py: short description… - No similar script already exists
- Name: max 32 chars, only lower case letters, digits and underscores
- Unique name, does not already exist in repository
- No shebang on the first line
- Comment in script with name/pseudo, e-mail and license using SPDX tags (see Contributing guide)
- Only English in code/comments
- Pure WeeChat API used, no extra API
- Function
hook_url,hook_processorhook_process_hashtableis used for any blocking call - For Python script: works with Python 3 (Python 2 support is optional)
- Score 100 / 100 displayed by weechat-script-lint
Checklist (script update)
- Author has been contacted
- Single commit, single file added
- Commit message format:
script_name.py X.Y: … - Script version and Changelog have been updated
- For Python script: works with Python 3 (Python 2 support is optional)
- Score 100 / 100 displayed by weechat-script-lint
Checklist (script deletion)
- Author has been contacted
- Single commit, single file deleted
- Commit message format:
Remove script name.pywith reasons in description