diff options
author | Sann Yay Aye | 2020-01-30 12:57:51 +0530 |
---|---|---|
committer | Sann Yay Aye | 2020-01-30 12:57:51 +0530 |
commit | 190966e010e321e4df56d40104ec80467a870e53 (patch) | |
tree | f97ac913ec59a975ad64d5a3cd61e11923d98a69 /venv/Lib/site-packages/pylint/checkers/__init__.py | |
parent | 7ecaa6f103b2755dc3bb3fae10a0d7ab28162596 (diff) | |
download | Chemical-Simulator-GUI-190966e010e321e4df56d40104ec80467a870e53.tar.gz Chemical-Simulator-GUI-190966e010e321e4df56d40104ec80467a870e53.tar.bz2 Chemical-Simulator-GUI-190966e010e321e4df56d40104ec80467a870e53.zip |
undo&redo_implementation
Diffstat (limited to 'venv/Lib/site-packages/pylint/checkers/__init__.py')
-rw-r--r-- | venv/Lib/site-packages/pylint/checkers/__init__.py | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/venv/Lib/site-packages/pylint/checkers/__init__.py b/venv/Lib/site-packages/pylint/checkers/__init__.py new file mode 100644 index 0000000..9c6306f --- /dev/null +++ b/venv/Lib/site-packages/pylint/checkers/__init__.py @@ -0,0 +1,64 @@ +# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> +# Copyright (c) 2013-2014 Google, Inc. +# Copyright (c) 2013 buck@yelp.com <buck@yelp.com> +# Copyright (c) 2014-2017 Claudiu Popa <pcmanticore@gmail.com> +# Copyright (c) 2014 Brett Cannon <brett@python.org> +# Copyright (c) 2014 Arun Persaud <arun@nubati.net> +# Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> +# Copyright (c) 2016 Moises Lopez <moylop260@vauxoo.com> +# Copyright (c) 2017-2018 Bryce Guinta <bryce.paul.guinta@gmail.com> + +# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html +# For details: https://github.com/PyCQA/pylint/blob/master/COPYING + +"""utilities methods and classes for checkers + +Base id of standard checkers (used in msg and report ids): +01: base +02: classes +03: format +04: import +05: misc +06: variables +07: exceptions +08: similar +09: design_analysis +10: newstyle +11: typecheck +12: logging +13: string_format +14: string_constant +15: stdlib +16: python3 +17: refactoring +18-50: not yet used: reserved for future internal checkers. +51-99: perhaps used: reserved for external checkers + +The raw_metrics checker has no number associated since it doesn't emit any +messages nor reports. XXX not true, emit a 07 report ! + +""" + +from pylint.checkers.base_checker import BaseChecker, BaseTokenChecker +from pylint.utils import register_plugins + + +def table_lines_from_stats(stats, _, columns): + """get values listed in <columns> from <stats> and <old_stats>, + and return a formated list of values, designed to be given to a + ureport.Table object + """ + lines = [] + for m_type in columns: + new = stats[m_type] + new = "%.3f" % new if isinstance(new, float) else str(new) + lines += (m_type.replace("_", " "), new, "NC", "NC") + return lines + + +def initialize(linter): + """initialize linter with checkers in this package """ + register_plugins(linter, __path__[0]) + + +__all__ = ("BaseChecker", "BaseTokenChecker", "initialize") |