1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Mon, 7 Apr 2025 14:05:32 +0200
Subject: Escape backslashes in docstrings
Python emits following warnings:
```
pyo/examples/x22-events/08-function-calls.py:8: SyntaxWarning: invalid escape sequence '\*'
EventCall calls a function, with any number of arguments (\*args) and uses
pyo/lib/mmlmusic.py:25: SyntaxWarning: invalid escape sequence '\ '
- We can break a long line into multiple short lines with the backslash ( \ ).
```
Escape the backslashes in docstrings to fix those warnings.
Bug-Debian: https://bugs.debian.org/1086927
Forwarded: https://github.com/belangeo/pyo/pull/296
---
pyo/examples/x22-events/08-function-calls.py | 2 +-
pyo/lib/mmlmusic.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyo/examples/x22-events/08-function-calls.py b/pyo/examples/x22-events/08-function-calls.py
index 7584210..4dbfa69 100644
--- a/pyo/examples/x22-events/08-function-calls.py
+++ b/pyo/examples/x22-events/08-function-calls.py
@@ -5,7 +5,7 @@
EventCall(function, *args, occurrences=inf, stopEventsWhenDone=True)
-EventCall calls a function, with any number of arguments (\*args) and uses
+EventCall calls a function, with any number of arguments (\\*args) and uses
its return value for the given parameter. The example below use a function
from the random module, *randrange*, with arguments and a user-defined
function, without argument, to create a rising, then falling, amplitude curve.
diff --git a/pyo/lib/mmlmusic.py b/pyo/lib/mmlmusic.py
index 840c03e..edc6b8b 100644
--- a/pyo/lib/mmlmusic.py
+++ b/pyo/lib/mmlmusic.py
@@ -22,7 +22,7 @@ Pre-Processing on music text
- A musical voice is represented by a single line of code.
-- We can break a long line into multiple short lines with the backslash ( \ ).
+- We can break a long line into multiple short lines with the backslash ( \\ ).
- The symbol equal ( = ), preceded by a variable name in UPPER CASE, creates a
macro. The remaining part of the line is the macro body. Anywhere the
|