Skip to content

Per dir config #1988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 57 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
1d623d1
expand_files returns a ModuleDescription instead of a dict
AWhetter Jun 23, 2016
1cbe43c
Moved expand_files to utils
AWhetter Jun 23, 2016
aa61b46
Moved parallel code outside of PyLinter
AWhetter Jun 23, 2016
7f3a3f5
expand_files returns a ModuleDescription instead of a dict
AWhetter Jun 23, 2016
9d68129
Moved expand_files to utils
AWhetter Jun 23, 2016
e592300
Moved parallel code outside of PyLinter
AWhetter Jun 23, 2016
d5592db
Split up find_pylintrc
AWhetter May 26, 2017
7b445d8
Slotted in IniFileParser and Configuration
AWhetter Jul 12, 2017
3191fe3
Slotted in argparse with CLIParser
AWhetter Jul 13, 2017
f410912
Implemented long help with argparse
AWhetter Jul 19, 2017
ba6f27a
Fixed callback options needing to take an argument
AWhetter Jul 26, 2017
6421ad1
Fixed option callbacks not getting run
AWhetter Jul 26, 2017
85c02ca
Finished removing optparse
AWhetter Jul 27, 2017
aed928e
Fixed Python2 syntax errors
AWhetter Jul 28, 2017
45f774b
Moved walk_up to utils
AWhetter Sep 9, 2017
7df26f9
Started using more specific exceptions in config
AWhetter Sep 9, 2017
07e4d08
Fixed up docstrings
AWhetter Sep 9, 2017
4b061ff
Merge remote-tracking branch 'upstream/per_dir_config' into per_dir_c…
hippo91 Feb 18, 2018
cfd7210
Add of _ManHelpFormatter class and beginning of generate_manpage coding.
hippo91 Feb 19, 2018
1df99a7
expand_files returns a ModuleDescription instead of a dict
AWhetter Jun 23, 2016
97adbec
Moved expand_files to utils
AWhetter Jun 23, 2016
a2ce483
Moved parallel code outside of PyLinter
AWhetter Jun 23, 2016
177166e
Split up find_pylintrc
AWhetter May 26, 2017
0513e1f
Slotted in IniFileParser and Configuration
AWhetter Jul 12, 2017
7160a33
Slotted in argparse with CLIParser
AWhetter Jul 13, 2017
6ec48bc
Implemented long help with argparse
AWhetter Jul 19, 2017
758e356
Fixed callback options needing to take an argument
AWhetter Jul 26, 2017
e0bbefa
Fixed option callbacks not getting run
AWhetter Jul 26, 2017
6e5bb56
Finished removing optparse
AWhetter Jul 27, 2017
a9320e6
Fixed Python2 syntax errors
AWhetter Jul 28, 2017
5159a46
Moved walk_up to utils
AWhetter Sep 9, 2017
95c92fe
Started using more specific exceptions in config
AWhetter Sep 9, 2017
49c2572
Fixed up docstrings
AWhetter Sep 9, 2017
04bdcad
Removed command line parsing from Linter
AWhetter Feb 3, 2018
ef30d55
Fixed some tests
AWhetter Feb 17, 2018
4c9b3f1
Merge branch 'per_dir_config' of https://github.com/PyCQA/pylint into…
hippo91 Mar 4, 2018
63126cb
Removing a comment
hippo91 Mar 4, 2018
a26fdd6
Add of the _ManHelpFormatter class
hippo91 Mar 4, 2018
af609c7
Beginning of manpage generation code
hippo91 Mar 4, 2018
2ba0588
Moved some Mixin initialisation into the relevant Mixins
AWhetter Feb 24, 2018
dbc15d8
Moved some reporting functions to runner
AWhetter Feb 24, 2018
760a62b
Fixed error mode
AWhetter Feb 24, 2018
08a5c6d
Removed warning for duplicate checkers
AWhetter Feb 25, 2018
a9444d8
PyLinter is no longer a reports handler
AWhetter Feb 25, 2018
9d5309e
Add InvalidCheckerError
Mar 4, 2018
602c712
Add check to not register same linter type twice (#1918)
fffergal Mar 16, 2018
37d3d66
Draft to generate manpage
hippo91 Mar 24, 2018
ae0705b
Merge branch 'per_dir_config' of https://github.com/PyCQA/pylint into…
hippo91 Mar 24, 2018
6ae2b43
Add version printing
Mar 24, 2018
5d01dc1
Add of format_option_help and format_heading methods
hippo91 Mar 31, 2018
d944f23
Nothing really new
hippo91 Mar 31, 2018
59c8399
Merge branch 'per_dir_config' of https://github.com/PyCQA/pylint into…
hippo91 Mar 31, 2018
abaead8
Correct formatting of the output of _ManHelpFormatter
hippo91 Mar 31, 2018
ce04b77
Coding format_help method of LongHelpArgumentGroup class. Addind form…
hippo91 Mar 31, 2018
2997d31
Activating printing of parser._parser
hippo91 Mar 31, 2018
9bf880a
Reformating format_help method in LongHelpArgumentGroup class using l…
hippo91 Apr 1, 2018
7e59cdd
Removing useless format_option_help method
hippo91 Apr 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pylint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

def run_pylint():
"""run pylint"""
from pylint.lint import Run
from pylint.lint import CLIRunner
try:
Run(sys.argv[1:])
CLIRunner().run(sys.argv[1:])
except KeyboardInterrupt:
sys.exit(1)

Expand Down
22 changes: 11 additions & 11 deletions pylint/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import tokenize
import warnings

from pylint.config import OptionsProviderMixIn
from pylint.reporters import diff_string
from pylint.utils import register_plugins
from pylint.interfaces import UNDEFINED
Expand All @@ -69,7 +68,7 @@ def table_lines_from_stats(stats, old_stats, columns):
return lines


class BaseChecker(OptionsProviderMixIn):
class BaseChecker(object):
"""base class for checkers"""
# checker name (you may reuse an existing one)
name = None
Expand All @@ -84,13 +83,9 @@ class BaseChecker(OptionsProviderMixIn):
# mark this checker as enabled or not.
enabled = True

def __init__(self, linter=None):
"""checker instances should have the linter as argument
priority = -1

linter is an object implementing ILinter
"""
self.name = self.name.lower()
OptionsProviderMixIn.__init__(self)
def __init__(self, linter=None):
self.linter = linter

def add_message(self, msg_id, line=None, node=None, args=None, confidence=UNDEFINED,
Expand All @@ -115,8 +110,13 @@ def process_tokens(self, tokens):
raise NotImplementedError()


def initialize(linter):
"""initialize linter with checkers in this package """
register_plugins(linter, __path__[0])
def initialize(registry):
"""Register the checkers in this package.

:param registry: The registry to register checkers with.
:type registry: PluginRegistry
"""
register_plugins(registry, __path__[0])


__all__ = ('BaseChecker', 'initialize')
Loading