From 2aa46bbfa23cf37ddba581079b8ee9b749480498 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Tue, 27 Jun 2023 00:56:40 -0700 Subject: [PATCH] Fix find occurrences flag Fixes #15527 Namespaces are untyped, so this only gets caught by mypyc. I didn't know about this feature, looks like it's explicitly documented as experimental. Guess no one has used it in a long, long time. --- mypy/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/main.py b/mypy/main.py index b60c5b2a6bba..11647362d1b4 100644 --- a/mypy/main.py +++ b/mypy/main.py @@ -1336,7 +1336,7 @@ def set_strict_flags() -> None: # Set build flags. if special_opts.find_occurrences: - state.find_occurrences = special_opts.find_occurrences.split(".") + state.find_occurrences = tuple(special_opts.find_occurrences.split(".")) assert state.find_occurrences is not None if len(state.find_occurrences) < 2: parser.error("Can only find occurrences of class members.")