From a26ae29c49e2a39953f1d1aca1e7f3b904c28ae9 Mon Sep 17 00:00:00 2001 From: Steven Myint Date: Sat, 2 Nov 2013 07:26:40 -0700 Subject: [PATCH] Increment minor version to 0.2 --- cpp/__init__.py | 2 +- cpp/find_warnings.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cpp/__init__.py b/cpp/__init__.py index 7525d19..b650ceb 100644 --- a/cpp/__init__.py +++ b/cpp/__init__.py @@ -1 +1 @@ -__version__ = '0.1.4' +__version__ = '0.2' diff --git a/cpp/find_warnings.py b/cpp/find_warnings.py index a08d8c0..afe687a 100644 --- a/cpp/find_warnings.py +++ b/cpp/find_warnings.py @@ -114,9 +114,9 @@ def _add_warning(self, msg, node, filename=None): def show_warnings(self): for filename, line_num, msg in sorted(self.warnings): if line_num == 0: - print('%s: %s' % (filename, msg)) + print('{}: {}'.format(filename, msg)) else: - print('%s:%d: %s' % (filename, line_num, msg)) + print('{}:{}: {}'.format(filename, line_num, msg)) def find_warnings(self): if is_header_file(self.filename): @@ -460,7 +460,7 @@ def _check_public_functions(self, primary_header, all_headers): if declared_only: node = public_symbols[name] if not node.templated_types: - msg = "'%s' declared but not defined" % name + msg = "'{}' declared but not defined".format(name) self._add_warning(msg, node, primary_header.filename) def _get_primary_header(self, included_files): @@ -482,7 +482,9 @@ def _find_source_warnings(self): # be something to warn against. I expect this will either # be configurable or removed in the future. But it's easy # to check for now. - msg = "'%s' forward declaration not expected in source file" % node.name + msg = ( + "'{}' forward declaration not expected in source file".format( + node.name)) self._add_warning(msg, node) # A primary header is optional. However, when looking up @@ -505,7 +507,8 @@ def _find_source_warnings(self): ] for (node, _) in included_files.values(): if node.filename in includes: - msg = "'%s' already #included in '%s'" % (node.filename, primary_header.filename) + msg = "'{}' already #included in '{}'".format( + node.filename, primary_header.filename) self._add_warning(msg, node) # TODO(nnorwitz): other warnings to add: