diff --git a/mypy/bogus_type.py b/mypy/bogus_type.py index 835c99bea397..fcf8accd0794 100644 --- a/mypy/bogus_type.py +++ b/mypy/bogus_type.py @@ -19,7 +19,8 @@ # This won't ever be true at runtime, but we consider it true during # mypyc compilations. -if sys.platform == 'mypyc': +MYPYC = False +if MYPYC: Bogus = FlexibleAlias[T, Any] else: Bogus = FlexibleAlias[T, T] diff --git a/mypy_bootstrap.ini b/mypy_bootstrap.ini index 1c4f8a1a8cf4..3a6eee6449d2 100644 --- a/mypy_bootstrap.ini +++ b/mypy_bootstrap.ini @@ -12,5 +12,4 @@ disallow_any_unimported = True warn_redundant_casts = True warn_unused_configs = True show_traceback = True -# Set the platform to something nonsense to signal to make Bogus = Any. -platform = mypyc +always_true = MYPYC diff --git a/mypy_self_check.ini b/mypy_self_check.ini index c865d538bac6..fcc26f49a4b6 100644 --- a/mypy_self_check.ini +++ b/mypy_self_check.ini @@ -12,3 +12,4 @@ disallow_any_unimported = True warn_redundant_casts = True warn_unused_configs = True show_traceback = True +always_false = MYPYC