Skip to content

ChainMap.fromkeys is positional-only#13239

Closed
tungol wants to merge 1 commit into
python:mainfrom
tungol:fromkeys
Closed

ChainMap.fromkeys is positional-only#13239
tungol wants to merge 1 commit into
python:mainfrom
tungol:fromkeys

Conversation

@tungol

@tungol tungol commented Dec 13, 2024

Copy link
Copy Markdown
Contributor

This one took me on a journey. I was looking at tkinter.Text.count originally, and realized it was a bug in stubtest Signatures.

I fixed the bug with python/mypy#18287 which only converts parameter names to index-based names if they're positional-only across all overloads. That MR makes the tkinter.Text.count error go away without any typeshed changes.

I realized it was the same bug that the ChainMap.fromkeys allowlist entry is commented with, and I removed the line to see what was going on with it with the bug fixed. Stubtest was complaining that it wasn't positional-only. So it doesn't need to wait for that bug to get fixed after all, unless there's a reason I'm missing to go against the implementation on this. [EDIT] The reason was that it's not positional-only before 3.13.

@tungol

tungol commented Dec 13, 2024

Copy link
Copy Markdown
Contributor Author

Ah, nevermind. That's what I get for not checking on different python versions. It'll wait for the stubtest MR I linked above then.

@tungol tungol closed this Dec 13, 2024
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant