nebius/SWE-bench-extra huggingface dataset:
Repository: claudep/swiss-qr-bill

Issue:
postfinance doesnt accept generated qr-code
Hi, our postfinance doesnt accept our generated qr-code because there are characters in line 30 that are not allowed (extra_infos, '##' character for visual line split). Is it possible to remove the character after line split (line 680 in bill.py)? Currently its readded after line split.  

Comments:

Patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index e03592e..d2906f1 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,6 +3,10 @@
 ChangeLog
 =========
 
+Unreleased
+----------
+- Replaced ``##`` with ``//`` as separator in additional informations (#75).
+
 0.7.1 (2022-03-07)
 ------------------
 - Fixed bad position of amount rect on receipt part (#74).
diff --git a/qrbill/bill.py b/qrbill/bill.py
index 92b38b4..f9476e8 100644
--- a/qrbill/bill.py
+++ b/qrbill/bill.py
@@ -675,9 +675,9 @@ class QRBill:
 
         if self.extra_infos:
             add_header(self.label("Additional information"))
-            if '##' in self.extra_infos:
-                extra_infos = self.extra_infos.split('##')
-                extra_infos[1] = '##' + extra_infos[1]
+            if '//' in self.extra_infos:
+                extra_infos = self.extra_infos.split('//')
+                extra_infos[1] = '//' + extra_infos[1]
             else:
                 extra_infos = [self.extra_infos]
             # TODO: handle line breaks for long infos (mandatory 5mm margin)


Test patch:
diff --git a/tests/test_qrbill.py b/tests/test_qrbill.py
index 8e7a010..02339da 100644
--- a/tests/test_qrbill.py
+++ b/tests/test_qrbill.py
@@ -293,7 +293,7 @@ class QRBillTests(unittest.TestCase):
             },
             ref_number='210000000003139471430009017',
             extra_infos=(
-                'Order of 15.09.2019##S1/01/20170309/11/10201409/20/1400'
+                'Order of 15.09.2019//S1/01/20170309/11/10201409/20/1400'
                 '0000/22/36958/30/CH106017086/40/1020/41/3010'
             )
         )
@@ -311,7 +311,7 @@ class QRBillTests(unittest.TestCase):
             'Rue du Lac\r\n1268\r\n2501\r\nBiel\r\nCH\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n'
             '1949.70\r\nCHF\r\nS\r\nPia-Maria Rutschmann-Schnyder\r\nGrosse Marktgasse\r\n'
             '28\r\n9400\r\nRorschach\r\nCH\r\nQRR\r\n210000000003139471430009017\r\n'
-            'Order of 15.09.2019##S1/01/20170309/11/10201409/20/14000000/22/36958/30/CH106017086'
+            'Order of 15.09.2019//S1/01/20170309/11/10201409/20/14000000/22/36958/30/CH106017086'
             '/40/1020/41/3010\r\nEPD'
         )
         with tempfile.NamedTemporaryFile(suffix='.svg') as fh:
Repository: click-contrib/sphinx-click

Issue:
Display `show_default` string even when `default=None`
# Current behavior

The option

```python
@click.option('--foo', show_default='mydefault')
```

will not have a default documented

# Expected behavior

The text `mydefault` is documented as the default value for this option.

# What now?

Looking at the code [here](https://github.com/click-contrib/sphinx-click/blob/6aeee375067483337b5cfda98233d4fb1a1addb1/sphinx_click/ext.py#L76), the fix seems relatively straightforward.

I'd like to submit a PR if you agree :)


Comments:

Patch:
diff --git a/sphinx_click/ext.py b/sphinx_click/ext.py
index be645ab..4441588 100644
--- a/sphinx_click/ext.py
+++ b/sphinx_click/ext.py
@@ -73,21 +73,20 @@ def _get_help_record(opt):
 
     extras = []
 
-    if opt.default is not None and opt.show_default:
-        if isinstance(opt.show_default, str):
-            # Starting from Click 7.0 this can be a string as well. This is
-            # mostly useful when the default is not a constant and
-            # documentation thus needs a manually written string.
-            extras.append(':default: %s' % opt.show_default)
-        else:
-            extras.append(
-                ':default: %s'
-                % (
-                    ', '.join(str(d) for d in opt.default)
-                    if isinstance(opt.default, (list, tuple))
-                    else opt.default,
-                )
+    if isinstance(opt.show_default, str):
+        # Starting from Click 7.0 show_default can be a string. This is
+        # mostly useful when the default is not a constant and
+        # documentation thus needs a manually written string.
+        extras.append(':default: %s' % opt.show_default)
+    elif opt.default is not None and opt.show_default:
+        extras.append(
+            ':default: %s'
+            % (
+                ', '.join(str(d) for d in opt.default)
+                if isinstance(opt.default, (list, tuple))
+                else opt.default,
             )
+        )
 
     if isinstance(opt.type, click.Choice):
         extras.append(':options: %s' % ' | '.join(str(x) for x in opt.type.choices))


Test patch:
diff --git a/tests/test_formatter.py b/tests/test_formatter.py
index 3a959d9..0cc8651 100644
--- a/tests/test_formatter.py
+++ b/tests/test_formatter.py
@@ -177,6 +177,10 @@ class CommandTestCase(unittest.TestCase):
             multiple=True,
             show_default=True,
         )
+        @click.option(
+            '--only-show-default',
+            show_default="Some default computed at runtime!",
+        )
         def foobar(bar):
             """A sample command."""
             pass
@@ -207,6 +211,10 @@ class CommandTestCase(unittest.TestCase):
         .. option:: --group <group>
 
             :default: ('foo', 'bar')
+
+        .. option:: --only-show-default <only_show_default>
+
+            :default: Some default computed at runtime!
         """
             ).lstrip(),
             '\n'.join(output),