Răsfoiți Sursa

docs: skip empty option groups

Marian Beermann 8 ani în urmă
părinte
comite
9d33ff1720

+ 0 - 2
docs/usage/benchmark_crud.rst.inc

@@ -19,8 +19,6 @@ borg benchmark crud
     +-------------------------------------------------------+----------+------------------------------------------+
     |                                                       | ``PATH`` | path were to create benchmark input data |
     +-------------------------------------------------------+----------+------------------------------------------+
-    | **optional arguments**                                                                                      |
-    +-------------------------------------------------------+----------+------------------------------------------+
     | .. class:: borg-common-opt-ref                                                                              |
     |                                                                                                             |
     | :ref:`common_options`                                                                                       |

+ 0 - 2
docs/usage/break-lock.rst.inc

@@ -17,8 +17,6 @@ borg break-lock
     +-------------------------------------------------------+----------------+-----------------------------------------+
     |                                                       | ``REPOSITORY`` | repository for which to break the locks |
     +-------------------------------------------------------+----------------+-----------------------------------------+
-    | **optional arguments**                                                                                           |
-    +-------------------------------------------------------+----------------+-----------------------------------------+
     | .. class:: borg-common-opt-ref                                                                                   |
     |                                                                                                                  |
     | :ref:`common_options`                                                                                            |

+ 0 - 2
docs/usage/change-passphrase.rst.inc

@@ -17,8 +17,6 @@ borg change-passphrase
     +-------------------------------------------------------+----------------+--+
     |                                                       | ``REPOSITORY`` |  |
     +-------------------------------------------------------+----------------+--+
-    | **optional arguments**                                                    |
-    +-------------------------------------------------------+----------------+--+
     | .. class:: borg-common-opt-ref                                            |
     |                                                                           |
     | :ref:`common_options`                                                     |

+ 0 - 2
docs/usage/key_change-passphrase.rst.inc

@@ -17,8 +17,6 @@ borg key change-passphrase
     +-------------------------------------------------------+----------------+--+
     |                                                       | ``REPOSITORY`` |  |
     +-------------------------------------------------------+----------------+--+
-    | **optional arguments**                                                    |
-    +-------------------------------------------------------+----------------+--+
     | .. class:: borg-common-opt-ref                                            |
     |                                                                           |
     | :ref:`common_options`                                                     |

+ 0 - 2
docs/usage/key_migrate-to-repokey.rst.inc

@@ -17,8 +17,6 @@ borg key migrate-to-repokey
     +-------------------------------------------------------+----------------+--+
     |                                                       | ``REPOSITORY`` |  |
     +-------------------------------------------------------+----------------+--+
-    | **optional arguments**                                                    |
-    +-------------------------------------------------------+----------------+--+
     | .. class:: borg-common-opt-ref                                            |
     |                                                                           |
     | :ref:`common_options`                                                     |

+ 0 - 2
docs/usage/rename.rst.inc

@@ -19,8 +19,6 @@ borg rename
     +-------------------------------------------------------+-------------+-----------------------------+
     |                                                       | ``NEWNAME`` | the new archive name to use |
     +-------------------------------------------------------+-------------+-----------------------------+
-    | **optional arguments**                                                                            |
-    +-------------------------------------------------------+-------------+-----------------------------+
     | .. class:: borg-common-opt-ref                                                                    |
     |                                                                                                   |
     | :ref:`common_options`                                                                             |

+ 0 - 2
docs/usage/serve.rst.inc

@@ -12,8 +12,6 @@ borg serve
 
     .. class:: borg-options-table
 
-    +-------------------------------------------------------+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-    | **positional arguments**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
     +-------------------------------------------------------+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
     | **optional arguments**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
     +-------------------------------------------------------+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

+ 0 - 2
docs/usage/umount.rst.inc

@@ -17,8 +17,6 @@ borg umount
     +-------------------------------------------------------+----------------+----------------------------------------+
     |                                                       | ``MOUNTPOINT`` | mountpoint of the filesystem to umount |
     +-------------------------------------------------------+----------------+----------------------------------------+
-    | **optional arguments**                                                                                          |
-    +-------------------------------------------------------+----------------+----------------------------------------+
     | .. class:: borg-common-opt-ref                                                                                  |
     |                                                                                                                 |
     | :ref:`common_options`                                                                                           |

+ 0 - 2
docs/usage/with-lock.rst.inc

@@ -21,8 +21,6 @@ borg with-lock
     +-------------------------------------------------------+----------------+--------------------+
     |                                                       | ``ARGS``       | command arguments  |
     +-------------------------------------------------------+----------------+--------------------+
-    | **optional arguments**                                                                      |
-    +-------------------------------------------------------+----------------+--------------------+
     | .. class:: borg-common-opt-ref                                                              |
     |                                                                                             |
     | :ref:`common_options`                                                                       |

+ 2 - 0
setup.py

@@ -304,6 +304,8 @@ class build_usage(Command):
                 # (no of columns used, columns, ...)
                 rows.append((1, '.. class:: borg-common-opt-ref\n\n:ref:`common_options`'))
             else:
+                if not group._group_actions:
+                    continue
                 rows.append((1, '**%s**' % group.title))
                 if is_positional_group(group):
                     for option in group._group_actions: