Skip to content

fix "invalid escape sequence" errors #576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amakea
Copy link

@amakea amakea commented May 29, 2025

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_process or hook_process_hashtable is 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.py with reasons in description

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