Skip to content

Consistently use literal-required error code for TypedDicts#14621

Merged
ilevkivskyi merged 2 commits intopython:masterfrom
ilevkivskyi:literal-code
Feb 7, 2023
Merged

Consistently use literal-required error code for TypedDicts#14621
ilevkivskyi merged 2 commits intopython:masterfrom
ilevkivskyi:literal-code

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Ref #7178

This code is used for some TypedDict errors, but misc was used for others. I make it more consistent. Also this code looks undocumented, so I add some basic docs.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Based on the clean mypy_primer output, this doesn't seem to be a major backward compatibility issue.

Comment thread docs/source/error_code_list.rst Outdated
------------------------------------------------------------

There are some places where only a (string) literal value is expected for
the purposes of statis type checking, for example a ``TypedDict`` key, or
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Typo: statis

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 7, 2023

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

@ilevkivskyi ilevkivskyi merged commit 35b2926 into python:master Feb 7, 2023
@ilevkivskyi ilevkivskyi deleted the literal-code branch February 7, 2023 18:18
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.

2 participants