From c30dea59697da1c6f211fdbb0b0ae9b1e91a0579 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Fri, 7 Dec 2018 10:06:44 -0800 Subject: [PATCH] Fix the installed dmypy script (#6029) Fixes #6028. --- mypy/dmypy.py | 5 ++++- setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mypy/dmypy.py b/mypy/dmypy.py index 9040f3818a88..b0219e608f43 100644 --- a/mypy/dmypy.py +++ b/mypy/dmypy.py @@ -492,6 +492,9 @@ def is_running() -> bool: # Run main(). +def console_entry() -> None: + main(sys.argv[1:]) + if __name__ == '__main__': - main(sys.argv[1:]) + console_entry() diff --git a/setup.py b/setup.py index 0aaf3e6ef672..8ab67dc44c90 100644 --- a/setup.py +++ b/setup.py @@ -157,7 +157,7 @@ def run(self): package_data={'mypy': package_data}, entry_points={'console_scripts': ['mypy=mypy.__main__:console_entry', 'stubgen=mypy.stubgen:main', - 'dmypy=mypy.dmypy:main', + 'dmypy=mypy.dmypy:console_entry', ]}, classifiers=classifiers, cmdclass=cmdclass,