From b76744b8209ddde241d80160efae12f353457327 Mon Sep 17 00:00:00 2001 From: Ryan McGinty Date: Sat, 18 Mar 2023 06:14:22 -0700 Subject: [PATCH] Update usage of mypy.main in test following updates to mypy package (#374) Last month, a mypy change was released that made all arguments for the mypy.main method keyword only. https://github.com/python/mypy/pull/13399 The alternative to this change is to freeze your version of mypy --- tests/test_annotations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_annotations.py b/tests/test_annotations.py index 3cd81b2d..f8cbcf17 100644 --- a/tests/test_annotations.py +++ b/tests/test_annotations.py @@ -107,7 +107,7 @@ def test_type_hints(self): try: # mypy.main uses sys.stdout for printing # We override it to catch error messages - mypy_main(None, text_io, text_io, [__file__], clean_exit=True) + mypy_main(args=[__file__], stdout=text_io, stderr=text_io, clean_exit=True) except SystemExit: # mypy.main could return errors found inside other files. # filter_errors() will filter out all errors outside this file.