diff --git a/src/stubber/rst/lookup.py b/src/stubber/rst/lookup.py index b3cefc08..59a18001 100644 --- a/src/stubber/rst/lookup.py +++ b/src/stubber/rst/lookup.py @@ -269,7 +269,7 @@ class Fix: Fix(r"\**", "*"), # change weirdly written wildcards \* --> * Fix(r"/*", "*"), # change weirdly written wildcards /* --> * Fix(r"**", "*"), # change weirdly written wildcards ** --> * - Fix(r"/)", ")"), # strange terminator in machine.USBDevice `USBDevice.active(self, [value] /)` + # Fix(r"/)", ")"), # do not fix , this is a positional only notation Fix("'param'", "param"), # loose notation in documentation # illegal keywords Fix( diff --git a/tests/rst/test_rst.py b/tests/rst/test_rst.py index c687f261..911c718f 100644 --- a/tests/rst/test_rst.py +++ b/tests/rst/test_rst.py @@ -202,8 +202,8 @@ def test_rst_parse_class_10(line: str): # ESPNow extra notation ("ESPNow.config('param') (ESP32 only)", "ESPNow.config(param)"), # machine.USBDevice - # Extranous / `USBDevice.active(self, [value] /)` - ("USBDevice.active(self, [value]/)", "USBDevice.active(self, value: Optional[Any]=None)"), + # Positional Only indicator should not be removed / `USBDevice.active(self, [value] /)` + ("USBDevice.active(self, [value]/)", "USBDevice.active(self, value: Optional[Any]=None/)"), ], ) def test_fix_param(param_in, expected):