summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-07-26 12:25:19 +0300
committerHugo <hugovk@users.noreply.github.com>2018-07-26 12:25:19 +0300
commit8fc5c1192d928075b61b54170424f05e03c06463 (patch)
tree0006cd38414d2df060936b88a7055b4e1dcc625a
parenta71e22936f8ef2efbbbeb7fd7b19d1f54f0c75c2 (diff)
downloadpython-prettytable-ptable-8fc5c1192d928075b61b54170424f05e03c06463.tar.gz
Upgrade Python syntax with pyupgrade
-rw-r--r--prettytable/prettytable.py6
1 files changed, 3 insertions, 3 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))