You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds two related test cases for #19918, one of them xfail. This is just an example from our command-line documentation. The fix to this situation wasn't as trivial as I was hoping so I ran out of the time I had allotted for the task, and do not here present a fix. But, these nicely-formatted test cases might help whoever actually fixes it save a little time. Then again, it's possible that my change to the fixture was misguided and this is actually a bad change (although, of course, I don't believe it was bad!). (Edit: the other PR also changed the fixture similarly. Great minds think alike.)
wyattscarpenter
changed the title
[WIP] fix how allow-redefinition-new doesn't imply allow-redefinitionAdd two related test cases for #19918Feb 3, 2026
I take it that this PR was superseded by #20853, which fixed #19918 and added an equivalent test for --allow-redefinition-new: https://github.com/python/mypy/pull/20853/files#diff-67935cf88860f40584a0d6bd2b849166bcb43408f7aaf7805c9c8e549457b394R1309. I will thus close this PR. The comment I added to the split type definition (and, also, I guess, the other test I added — although since it's in our documentation anyway, #19919 would obsolete it as well) seems like an improvement to me, but so trivial that it's not worth keeping this PR open. If anyone wants it, feel free to open this PR again and take it ¯\_(ツ)_/¯. I'm going to delete this branch shortly, but there are ways around that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds two related test cases for #19918,
one of them xfail. This is just an example from our command-line documentation. The fix to this situation wasn't as trivial as I was hoping so I ran out of the time I had allotted for the task, and do not here present a fix. But, these nicely-formatted test cases might help whoever actually fixes it save a little time. Then again, it's possible that my change to the fixture was misguided and this is actually a bad change (although, of course, I don't believe it was bad!). (Edit: the other PR also changed the fixture similarly. Great minds think alike.)