summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2014-11-17 19:15:30 +0200
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2014-11-17 19:15:30 +0200
commitd7f31a26bddca79be09463dffc83430f7c59f238 (patch)
tree447a38b119e869269fc75b541ea5fa8819e1db4a
parent99794fee75f9c9ba3ddf894824e73cafeec42ee0 (diff)
downloadpylint-git-d7f31a26bddca79be09463dffc83430f7c59f238.tar.gz
Remove get_init_args from the Message class and move it as private function in lint.py.
-rw-r--r--lint.py18
-rw-r--r--utils.py10
2 files changed, 17 insertions, 11 deletions
diff --git a/lint.py b/lint.py
index 81d9aadb9..1b982990c 100644
--- a/lint.py
+++ b/lint.py
@@ -69,6 +69,22 @@ from pylint import config
from pylint.__pkginfo__ import version
+def _get_new_args(message):
+ location = (
+ message.abspath,
+ message.path,
+ message.module,
+ message.obj,
+ message.line,
+ message.column,
+ )
+ return (
+ message.msg_id,
+ message.symbol,
+ location,
+ message.msg,
+ message.confidence,
+ )
def _get_python_path(filepath):
dirname = os.path.realpath(os.path.expanduser(filepath))
@@ -220,7 +236,7 @@ if multiprocessing is not None:
# Run the checks.
linter.check(file_or_module)
- msgs = [m.get_init_args() for m in linter.reporter.messages]
+ msgs = [_get_new_args(m) for m in linter.reporter.messages]
return (file_or_module, linter.file_state.base_name, linter.current_name,
msgs, linter.stats, linter.msg_status)
diff --git a/utils.py b/utils.py
index 62bd7e6b9..0f7f448fe 100644
--- a/utils.py
+++ b/utils.py
@@ -94,16 +94,6 @@ class Message(_MsgBase):
cls, msg_id, symbol, msg, msg_id[0], MSG_TYPES[msg_id[0]],
confidence, *location)
- def get_init_args(self):
- location = (
- self.abspath,
- self.path,
- self.module,
- self.obj,
- self.line,
- self.column)
- return (self.msg_id, self.symbol, location, self.msg, self.confidence)
-
def format(self, template):
"""Format the message according to the given template.