Method: pylint.lint.pylinter.PyLinter.__init__
Calls: 101643, Exceptions: 0, Paths: 8Back
Path 1: 47845 calls (0.47)
PyLinter (47337) UnittestLinter (476) Run (30) _CustomPyLinter (2)
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)
Path 2: 47815 calls (0.47)
PyLinter (47337) UnittestLinter (476) _CustomPyLinter (2)
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)
Path 3: 1519 calls (0.01)
'pylint' (1488) 'pyreverse' (30) 'test' (1)
None (1519)
None (1489) 'Create UML diagrams for classes and modules in
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)
Path 4: 1488 calls (0.01)
PyLinter (1248) UnittestLinter (238) _CustomPyLinter (2)
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)
Path 5: 1488 calls (0.01)
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)
Path 6: 1159 calls (0.01)
() (1159)
None (1159)
() (1159)
None (1159)
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)
Path 7: 259 calls (0.0)
tuple (259)
None (259)
tuple (259)
'/Users/andrehora/Documents/git/projects-pathspotter/pylint/pylint/testutils/testing_pylintrc' (160) '/Users/andrehora/Documents/git/projects-pathspot...
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)
Path 8: 70 calls (0.0)
() (70)
GenericTestReporter (67) JSONReporter (2) ParseableTextReporter (1)
() (70)
None (70)
1def __init__(
2 self,
3 options: Options = (),
4 reporter: reporters.BaseReporter | reporters.MultiReporter | None = None,
5 option_groups: tuple[tuple[str, str], ...] = (),
6 # TODO: Deprecate passing the pylintrc parameter
7 pylintrc: str | None = None, # pylint: disable=unused-argument
8 ) -> None:
9 _ArgumentsManager.__init__(self, prog="pylint")
10 _MessageStateHandler.__init__(self, self)
11
12 # Some stuff has to be done before initialization of other ancestors...
13 # messages store / checkers / reporter / astroid manager
14
15 # Attributes for reporters
16 self.reporter: reporters.BaseReporter | reporters.MultiReporter
17 if reporter:
18 self.set_reporter(reporter)
19 else:
20 self.set_reporter(TextReporter())
21 self._reporters: dict[str, type[reporters.BaseReporter]] = {}
22 """Dictionary of possible but non-initialized reporters."""
23
24 # Attributes for checkers and plugins
25 self._checkers: defaultdict[
26 str, list[checkers.BaseChecker]
27 ] = collections.defaultdict(list)
28 """Dictionary of registered and initialized checkers."""
29 self._dynamic_plugins: dict[str, ModuleType | ModuleNotFoundError | bool] = {}
30 """Set of loaded plugin names."""
31
32 # Attributes related to stats
33 self.stats = LinterStats()
34
35 # Attributes related to (command-line) options and their parsing
36 self.options: Options = options + _make_linter_options(self)
37 for opt_group in option_groups:
38 self.option_groups_descs[opt_group[0]] = opt_group[1]
39 self._option_groups: tuple[tuple[str, str], ...] = option_groups + (
40 ("Messages control", "Options controlling analysis messages"),
41 ("Reports", "Options related to output formatting and reporting"),
42 )
43 self.fail_on_symbols: list[str] = []
44 """List of message symbols on which pylint should fail, set by --fail-on."""
45 self._error_mode = False
46
47 reporters.ReportsHandlerMixIn.__init__(self)
48 checkers.BaseChecker.__init__(self, self)
49 # provided reports
50 self.reports = (
51 ("RP0001", "Messages by category", report_total_messages_stats),
52 (
53 "RP0002",
54 "% errors / warnings by module",
55 report_messages_by_module_stats,
56 ),
57 ("RP0003", "Messages", report_messages_stats),
58 )
59
60 # Attributes related to registering messages and their handling
61 self.msgs_store = MessageDefinitionStore(self.config.py_version)
62 self.msg_status = 0
63 self._by_id_managed_msgs: list[ManagedMessage] = []
64
65 # Attributes related to visiting files
66 self.file_state = FileState("", self.msgs_store, is_base_filestate=True)
67 self.current_name: str | None = None
68 self.current_file: str | None = None
69 self._ignore_file = False
70 self._ignore_paths: list[Pattern[str]] = []
71
72 self.register_checker(self)