diff options
author | Kane Blueriver <kxxoling@gmail.com> | 2018-07-27 00:30:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-27 00:30:24 +0800 |
commit | d66176fcd2bf1247c4858f3e48c9c18982b05c44 (patch) | |
tree | 0006cd38414d2df060936b88a7055b4e1dcc625a | |
parent | 4676e41472725b03badcd9517f5aa2c2a41c1ebf (diff) | |
parent | 8fc5c1192d928075b61b54170424f05e03c06463 (diff) | |
download | python-prettytable-ptable-d66176fcd2bf1247c4858f3e48c9c18982b05c44.tar.gz |
Merge pull request #24 from hugovk/rm-2.6
Drop support for EOL Python <= 2.6
-rw-r--r-- | prettytable/prettytable.py | 6 | ||||
-rw-r--r-- | setup.py | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/prettytable/prettytable.py b/prettytable/prettytable.py index 1f9e3a1..dae13f5 100644 --- a/prettytable/prettytable.py +++ b/prettytable/prettytable.py @@ -302,7 +302,7 @@ class PrettyTable(object): try: assert int(val) >= 0 except AssertionError: - raise Exception("Invalid value for %s: %s!" % (name, self._unicode(val))) + raise Exception("Invalid value for {}: {}!".format(name, self._unicode(val))) def _validate_true_or_false(self, name, val): try: @@ -1438,7 +1438,7 @@ class PrettyTable(object): open_tag.append("<table") if options["attributes"]: for attr_name in options["attributes"]: - open_tag.append(" %s=\"%s\"" % (attr_name, options["attributes"][attr_name])) + open_tag.append(" {}=\"{}\"".format(attr_name, options["attributes"][attr_name])) open_tag.append(">") lines.append("".join(open_tag)) @@ -1505,7 +1505,7 @@ class PrettyTable(object): open_tag.append(" frame=\"vsides\" rules=\"cols\"") if options["attributes"]: for attr_name in options["attributes"]: - open_tag.append(" %s=\"%s\"" % (attr_name, options["attributes"][attr_name])) + open_tag.append(" {}=\"{}\"".format(attr_name, options["attributes"][attr_name])) open_tag.append(">") lines.append("".join(open_tag)) @@ -20,11 +20,13 @@ setup( }, classifiers=[ 'Programming Language :: Python', - 'Programming Language :: Python :: 2.4', - 'Programming Language :: Python :: 2.5', - 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: Implementation :: CPython', 'License :: OSI Approved :: BSD License', 'Topic :: Text Processing' ], |