# Buggy code
def run_pylint():
    """run pylint"""

    try:
        PylintRun(sys.argv[1:])
    except KeyboardInterrupt:
        sys.exit(1)


# Traceback (ModuleNotFoundError)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/runpy.py", line 263, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/jeppe/.bin/pylint", line 5, in <module>
from pylint import run_pylint
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/__init__.py", line 13, in <module>
from pylint.checkers.similar import Run as SimilarRun
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/checkers/__init__.py", line 42, in <module>
from pylint.checkers.base_checker import BaseChecker, BaseTokenChecker
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/checkers/base_checker.py", line 17, in <module>
from pylint.config import OptionsProviderMixIn
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/config.py", line 49, in <module>
from pylint import utils
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/utils/__init__.py", line 44, in <module>
from pylint.utils.ast_walker import ASTWalker
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 8, in <module>
from astroid import nodes
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/astroid/__init__.py", line 63, in <module>
from astroid.nodes import *
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/astroid/nodes.py", line 23, in <module>
from astroid.node_classes import (
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/astroid/node_classes.py", line 38, in <module>
from astroid import bases
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/astroid/bases.py", line 32, in <module>
MANAGER = manager.AstroidManager()
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/astroid/util.py", line 26, in <lambda>
lambda: importlib.import_module("." + module_name, "astroid")
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/astroid/manager.py", line 25, in <module>
from astroid import modutils
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/astroid/modutils.py", line 32, in <module>
import platform
File "/Users/jeppe/platform.py", line 1, in <module>
import non_existing_module
ModuleNotFoundError: No module named 'non_existing_module'
Traceback (most recent call last):
File "/Users/jeppe/.bin/pylint", line 8, in <module>
sys.exit(run_pylint())
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/__init__.py", line 23, in run_pylint
PylintRun(sys.argv[1:])
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/lint.py", line 1731, in __init__
linter.check(args)
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/lint.py", line 1006, in check
self._parallel_check(files_or_modules)
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/lint.py", line 1080, in _parallel_check
for result in self._parallel_task(files_or_modules):
File "/Users/jeppe/.virtualenvs/sublime-tools/lib/python3.8/site-packages/pylint/lint.py", line 1028, in _parallel_task
manager = multiprocessing.Manager()
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/context.py", line 57, in Manager
m.start()
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/managers.py", line 583, in start
self._address = reader.recv()
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
buf = self._recv(4)
File "/Users/jeppe/.pyenv/versions/3.8.1/lib/python3.8/multiprocessing/connection.py", line 383, in _recv
raise EOFError
EOFError

# Fixed code
def run_pylint():
    """run pylint"""
    from pylint.lint import Run as PylintRun

    try:
        PylintRun(sys.argv[1:])
    except KeyboardInterrupt:
        sys.exit(1)