mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 05:54:17 +00:00
Fixed errors found by linters
This commit is contained in:
parent
0e8a0625d5
commit
f1c8abe003
2 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue