Skip to content

Commit

Permalink
Rewrite pylint init-hook (home-assistant#65193)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Jan 29, 2022
1 parent cc6b0cc commit be5ff87
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ ignore = [
# Use a conservative default here; 2 should speed up most setups and not hurt
# any too bad. Override on command line as appropriate.
jobs = 2
init-hook='from pylint.config.find_default_config_files import find_default_config_files; from pathlib import Path; import sys; sys.path.append(str(Path(Path(list(find_default_config_files())[0]).parent, "pylint/plugins")))'
init-hook = """\
from pathlib import Path; \
import sys; \
from pylint.config import find_default_config_files; \
sys.path.append( \
str(Path(next(find_default_config_files())).parent.joinpath('pylint/plugins'))
) \
"""
load-plugins = [
"pylint.extensions.code_style",
"pylint.extensions.typing",
Expand Down

0 comments on commit be5ff87

Please sign in to comment.