Jelajahi Sumber

Merge pull request #543 from hansmi/dedent-pattern-help

Dedent pattern help text
TW 9 tahun lalu
induk
melakukan
d02def56f5
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      borg/archiver.py

+ 2 - 2
borg/archiver.py

@@ -597,7 +597,7 @@ class Archiver:
         return self.exit_code
         return self.exit_code
 
 
     helptext = {}
     helptext = {}
-    helptext['patterns'] = '''
+    helptext['patterns'] = textwrap.dedent('''
         Exclude patterns use a variant of shell pattern syntax, with '*' matching any
         Exclude patterns use a variant of shell pattern syntax, with '*' matching any
         number of characters, '?' matching any single character, '[...]' matching any
         number of characters, '?' matching any single character, '[...]' matching any
         single character specified, including ranges, and '[!...]' matching any
         single character specified, including ranges, and '[!...]' matching any
@@ -624,7 +624,7 @@ class Archiver:
 
 
         # The file '/home/user/cache/important' is *not* backed up:
         # The file '/home/user/cache/important' is *not* backed up:
         $ borg create -e /home/user/cache/ backup / /home/user/cache/important
         $ borg create -e /home/user/cache/ backup / /home/user/cache/important
-        '''
+        ''')
 
 
     def do_help(self, parser, commands, args):
     def do_help(self, parser, commands, args):
         if not args.topic:
         if not args.topic: