diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-11-17 19:15:30 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-11-17 19:15:30 +0200 |
commit | d7f31a26bddca79be09463dffc83430f7c59f238 (patch) | |
tree | 447a38b119e869269fc75b541ea5fa8819e1db4a | |
parent | 99794fee75f9c9ba3ddf894824e73cafeec42ee0 (diff) | |
download | pylint-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.py | 18 | ||||
-rw-r--r-- | utils.py | 10 |
2 files changed, 17 insertions, 11 deletions
@@ -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) @@ -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. |