Skip to content

Commit 5728d82

Browse files
Add __all__ in __init__.py so all import are used
1 parent 24ce552 commit 5728d82

File tree

6 files changed

+47
-4
lines changed

6 files changed

+47
-4
lines changed

doc/exts/pylint_features.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""Script used to generate the features file before building the actual documentation."""
66

77
import os
8-
import sys
98

109
import sphinx
1110

@@ -19,7 +18,6 @@ def builder_inited(app):
1918
)
2019
linter = PyLinter()
2120
linter.load_default_plugins()
22-
2321
features = os.path.join(base_path, "doc", "technical_reference", "features.rst")
2422
with open(features, "w") as stream:
2523
stream.write("Pylint features\n")

pylint/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ def run_symilar():
4242
from pylint.checkers.similar import Run as SimilarRun
4343

4444
SimilarRun(sys.argv[1:])
45+
46+
47+
__all__ = ["__version__"]

pylint/checkers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ def initialize(linter):
6464
register_plugins(linter, __path__[0])
6565

6666

67-
__all__ = ("BaseChecker", "BaseTokenChecker", "initialize")
67+
__all__ = ["BaseChecker", "BaseTokenChecker", "initialize", "register_plugins"]

pylint/config/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,14 @@
4646
from pylint.config.options_provider_mixin import OptionsProviderMixIn, UnsupportedAction
4747

4848
__all__ = [
49-
"UnsupportedAction",
5049
"ConfigurationMixIn",
50+
"find_default_config_files",
51+
"_ManHelpFormatter",
52+
"Option",
5153
"OptionsManagerMixIn",
54+
"OptionParser",
55+
"OptionsProviderMixIn",
56+
"UnsupportedAction",
5257
]
5358

5459
USER_HOME = os.path.expanduser("~")

pylint/lint/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,18 @@
8787
preprocess_options,
8888
)
8989

90+
__all__ = [
91+
"check_parallel",
92+
"PyLinter",
93+
"report_messages_by_module_stats",
94+
"report_messages_stats",
95+
"report_total_messages_stats",
96+
"Run",
97+
"ArgumentPreprocessingError",
98+
"_patch_sys_path",
99+
"fix_import_path",
100+
"preprocess_options",
101+
]
102+
90103
if __name__ == "__main__":
91104
Run(sys.argv[1:])

pylint/utils/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,27 @@
6767
safe_decode,
6868
tokenize_module,
6969
)
70+
71+
__all__ = [
72+
"ASTWalker",
73+
"HAS_ISORT_5",
74+
"IsortDriver",
75+
"_basename_in_blacklist_re",
76+
"_check_csv",
77+
"_format_option_value",
78+
"_splitstrip",
79+
"_unquote",
80+
"decoding_stream",
81+
"deprecated_option",
82+
"expand_modules",
83+
"FileState",
84+
"format_section",
85+
"get_global_option",
86+
"get_module_and_frameid",
87+
"get_rst_section",
88+
"get_rst_title",
89+
"normalize_text",
90+
"register_plugins",
91+
"safe_decode",
92+
"tokenize_module",
93+
]

0 commit comments

Comments
 (0)