Fixed errors found by linters

This commit is contained in:
Aleskarova, Dinara 2017-05-02 12:01:00 +04:00
parent 0e8a0625d5
commit f1c8abe003
2 changed files with 4 additions and 2 deletions

View file

@ -168,7 +168,7 @@ class BaseFormatter(object):
def _write(self, output): def _write(self, output):
"""Handle logic of whether to use an output file or print().""" """Handle logic of whether to use an output file or print()."""
if sys.version_info < (3, 0) and isinstance(output, unicode): if sys.version_info < (3, 0) and not isinstance(output, str):
output = output.encode('UTF-8') output = output.encode('UTF-8')
if self.output_fd is not None: if self.output_fd is not None:
self.output_fd.write(output + self.newline) self.output_fd.write(output + self.newline)

View file

@ -268,7 +268,9 @@ class OptionManager(object):
setattr(options, option.dest, option.normalize(old_value)) setattr(options, option.dest, option.normalize(old_value))
def parse_args(self, args=None, values=None): def parse_args(self, args=None, values=None):
"""Implement simple proxy to calling the OptionParser's parse_args method.""" """
Use simple proxy to calling the OptionParser's parse_args method.
"""
self.generate_epilog() self.generate_epilog()
self.update_version_string() self.update_version_string()
options, xargs = self.parser.parse_args(args, values) options, xargs = self.parser.parse_args(args, values)