diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-18 09:54:07 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-18 09:54:07 +0200 |
commit | a24d14aeb8941f8830471d3c823cb64f13e1d2ac (patch) | |
tree | 0847e83bc0f0ba20c25f3fc3bd32eb6b28a7e238 /modules | |
parent | badf822ea07c7c551aeeef3cde4660a1251e1584 (diff) |
format2 parser bugfix, removing of pk
Diffstat (limited to 'modules')
-rw-r--r-- | modules/language/python/format2.scm | 11 | ||||
-rw-r--r-- | modules/language/python/module/optparse.py | 4 |
2 files changed, 2 insertions, 13 deletions
diff --git a/modules/language/python/format2.scm b/modules/language/python/format2.scm index 22cb318..eb6b8d0 100644 --- a/modules/language/python/format2.scm +++ b/modules/language/python/format2.scm @@ -57,6 +57,7 @@ "x"))) (let ((prec (if prec prec 6)) + (min (if min min 0)) (c (if c c ""))) (match tp ("c" @@ -220,15 +221,7 @@ ((#:% #f c min #:* _ tp) (lambda (prec x) ((create c min prec tp) x))) - - ((#:% #f (and c (or "s" "r" "a")) min prec _ tp) - (create c 0 prec tp)) - - ((#:% tag (and c (or "s" "r" "a")) min prec _ tp) - (let ((f (create c 0 prec tp))) - (lambda (x) - (f (pylist-ref x tag))))) - + ((#:% #f c min prec _ tp) (create c min prec tp)) ((#:% tag c min prec _ tp) diff --git a/modules/language/python/module/optparse.py b/modules/language/python/module/optparse.py index 657c97d..043ea9a 100644 --- a/modules/language/python/module/optparse.py +++ b/modules/language/python/module/optparse.py @@ -380,11 +380,9 @@ class IndentedHelpFormatter (HelpFormatter): self, indent_increment, max_help_position, width, short_first) def format_usage(self, usage): - pk('IndentedHelpFormatter usage') return _("Usage: %s\n") % usage def format_heading(self, heading): - pk('IndentedHelpFormatter heading') return "%*s%s:\n" % (self.current_indent, "", heading) @@ -401,11 +399,9 @@ class TitledHelpFormatter (HelpFormatter): self, indent_increment, max_help_position, width, short_first) def format_usage(self, usage): - pk('TitledHelpFormatter heading') return "%s %s\n" % (self.format_heading(_("Usage")), usage) def format_heading(self, heading): - pk('TitledHelpFormatter heading') return "%s\n%s\n" % (heading, "=-"[self.level] * len(heading)) |