Skip to content
Snippets Groups Projects
Commit f63c9a9e authored by Greg Wilson's avatar Greg Wilson
Browse files

Fixing types

parent 41f5bfed
Branches
Tags
No related merge requests found
......@@ -228,7 +228,7 @@ class CheckBase(object):
cls = self.get_val(node, 'attr', 'class')
self.reporter.check(cls in KNOWN_BLOCKQUOTES,
(self.filename, self.get_loc(node)),
'Unknown or missing blockquote type {0} in {1}:{2}',
'Unknown or missing blockquote type {0}',
cls)
......@@ -239,7 +239,7 @@ class CheckBase(object):
cls = self.get_val(node, 'attr', 'class')
self.reporter.check(cls in KNOWN_CODEBLOCKS,
(self.filename, self.get_loc(node)),
'Unknown or missing code block type {0} in {1}:{2}',
'Unknown or missing code block type {0}',
cls)
......
......@@ -29,11 +29,11 @@ class Reporter(object):
def add(self, location, fmt, *args):
'''Append error unilaterally.'''
if type(location) is NoneType:
if isinstance(location, type(None)):
extra = ''
elif type(location) is str:
elif isinstance(location, str):
extra = 'at {0}'.format(filename)
elif type(location) is tuple:
elif isinstance(location, tuple):
filename, line_number = location
extra = 'at {0}:{1}'.format(*location)
else:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment