changeset 3411:f30b238d9c45

jp: follow best practices and use a dash (`-`) instead of underscore (`_`) for long options.
author Goffi <goffi@goffi.org>
date Thu, 12 Nov 2020 14:53:16 +0100 (2020-11-12)
parents 55f9a38864af
children 7b4ae3dbc041
files sat_frontends/jp/cmd_file.py sat_frontends/jp/cmd_message.py sat_frontends/jp/cmd_pubsub.py sat_frontends/jp/cmd_roster.py
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_file.py	Thu Nov 12 14:53:16 2020 +0100
+++ b/sat_frontends/jp/cmd_file.py	Thu Nov 12 14:53:16 2020 +0100
@@ -456,7 +456,7 @@
 
     def add_parser_options(self):
         self.parser.add_argument(
-            '-o', '--dest_file', type=str, default='',
+            '-o', '--dest-file', type=str, default='',
             help=_("destination file (DEFAULT: filename from URL)")
             )
         self.parser.add_argument(
--- a/sat_frontends/jp/cmd_message.py	Thu Nov 12 14:53:16 2020 +0100
+++ b/sat_frontends/jp/cmd_message.py	Thu Nov 12 14:53:16 2020 +0100
@@ -60,7 +60,7 @@
             help=_("subject of the message"),
         )
         self.parser.add_argument(
-            "-L", "--subject_lang", type=str, default="", help=_("language of subject")
+            "-L", "--subject-lang", type=str, default="", help=_("language of subject")
         )
         self.parser.add_argument(
             "-t",
--- a/sat_frontends/jp/cmd_pubsub.py	Thu Nov 12 14:53:16 2020 +0100
+++ b/sat_frontends/jp/cmd_pubsub.py	Thu Nov 12 14:53:16 2020 +0100
@@ -1530,7 +1530,7 @@
         )
         self.parser.add_argument(
             "-I",
-            "--ignore_errors",
+            "--ignore-errors",
             action="store_true",
             help=_(
                 "if command return a non zero exit code, ignore the item and continue"),
--- a/sat_frontends/jp/cmd_roster.py	Thu Nov 12 14:53:16 2020 +0100
+++ b/sat_frontends/jp/cmd_roster.py	Thu Nov 12 14:53:16 2020 +0100
@@ -200,10 +200,10 @@
 
     def add_parser_options(self):
         self.parser.add_argument(
-            "--no_from", action="store_true",
+            "--no-from", action="store_true",
             help=_("also purge contacts with no 'from' subscription"))
         self.parser.add_argument(
-            "--no_to", action="store_true",
+            "--no-to", action="store_true",
             help=_("also purge contacts with no 'to' subscription"))
 
     async def start(self):