Skip to content

Commit

Permalink
Merge pull request #5 from hugovk/rm-eol
Browse files Browse the repository at this point in the history
Drop support for EOL Python
  • Loading branch information
flaper87 authored Sep 18, 2018
2 parents e44ba73 + ee1c8aa commit 2a0f520
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 6 additions & 8 deletions prettytable.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def _validate_nonnegative_int(self, name, val):
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:
Expand Down Expand Up @@ -1409,11 +1409,10 @@ def _get_simple_html_string(self, options):
else:
linebreak = "<br>"

open_tag = []
open_tag.append("<table")
open_tag = ["<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))

Expand Down Expand Up @@ -1458,8 +1457,7 @@ def _get_formatted_html_string(self, options):
else:
linebreak = "<br>"

open_tag = []
open_tag.append("<table")
open_tag = ["<table"]
if options["border"]:
if options["hrules"] == ALL and options["vrules"] == ALL:
open_tag.append(" frame=\"box\" rules=\"all\"")
Expand All @@ -1477,7 +1475,7 @@ def _get_formatted_html_string(self, options):
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))

Expand Down Expand Up @@ -1659,7 +1657,7 @@ def generate_table(self, rows):
for i in range(1,appends):
row[0].append("-")

if row[1] == True:
if row[1]:
self.make_fields_unique(row[0])
table.field_names = row[0]
else:
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
setup(
name='prettytable',
version=version,
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
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.7',
'License :: OSI Approved :: BSD License',
'Topic :: Text Processing'
],
Expand Down

0 comments on commit 2a0f520

Please sign in to comment.