summaryrefslogtreecommitdiff
path: root/pylint/lint.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-05-22 08:56:46 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2019-05-22 09:26:18 +0200
commit6b0003da63d30d0f345f24380c340b064713597f (patch)
tree47fce11a3b686129d09e08df4f2deb6fc762a5e6 /pylint/lint.py
parentf9e99fd5f3acaf2d836c7a3456f7538611cd4167 (diff)
downloadpylint-git-6b0003da63d30d0f345f24380c340b064713597f.tar.gz
Fix a bunch of linting errors from the codebase
Diffstat (limited to 'pylint/lint.py')
-rw-r--r--pylint/lint.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/pylint/lint.py b/pylint/lint.py
index 1718b03a5..f59919649 100644
--- a/pylint/lint.py
+++ b/pylint/lint.py
@@ -101,7 +101,6 @@ def _ast_from_string(data, filepath, modname):
def _read_stdin():
# https://mail.python.org/pipermail/python-list/2012-November/634424.html
- # FIXME should this try to check the file's declared encoding?
sys.stdin = TextIOWrapper(sys.stdin.detach(), encoding="utf-8")
return sys.stdin.read()
@@ -765,7 +764,6 @@ class PyLinter(
checker.load_defaults()
# Register the checker, but disable all of its messages.
- # TODO(cpopa): we should have a better API for this.
if not getattr(checker, "enabled", True):
self.disable(checker.name)
@@ -1136,9 +1134,7 @@ class PyLinter(
ast_node = self.get_ast(filepath, modname)
if ast_node is None:
continue
- # XXX to be correct we need to keep module_msgs_state for every
- # analyzed module (the problem stands with localized messages which
- # are only detected in the .close step)
+
self.file_state = FileState(descr["basename"])
self._ignore_file = False
# fix the current file (if the source file was not available or
@@ -1253,7 +1249,6 @@ class PyLinter(
if self.file_state.base_name is not None:
# load previous results if any
previous_stats = config.load_results(self.file_state.base_name)
- # XXX code below needs refactoring to be more reporter agnostic
self.reporter.on_close(self.stats, previous_stats)
if self.config.reports:
sect = self.make_reports(self.stats, previous_stats)
@@ -1746,7 +1741,7 @@ group are mutually exclusive.",
self.linter.print_full_documentation()
sys.exit(0)
- def cb_list_messages(self, option, optname, value, parser): # FIXME
+ def cb_list_messages(self, option, optname, value, parser):
"""optik callback for printing available messages"""
self.linter.msgs_store.list_messages()
sys.exit(0)