[stubtest] support `@type_check_only` decorator by sobolevn · Pull Request #16422 · python/mypy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I fully understand what the point is of adding the tests you've added in this file, since they all seem to be asserting undesirable behaviour

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not undersirable, it just a status-quo. It is expected to be working like this for now. We don't have any other expected behavior for now.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and the status quo is undesirable -- ideally, mypy would fully support @type_check_only. If somebody came along and implemented the feature in the future, I think it would be highly confusing if existing tests started failing as a result of the feature being implemented

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we now know that these tests work and can add them later.
I am actually interested in working on this further :)