Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Deprecated --force-uppercase-builtins flag#19176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4,6 +4,7 @@ | ||
| import re | ||
| import sys | ||
| import sysconfig | ||
| import warnings | ||
| from collections.abc import Mapping | ||
| from re import Pattern | ||
| from typing import Any, Callable, Final | ||
| @@ -400,6 +401,7 @@ def __init__(self) -> None: | ||
| self.disable_bytearray_promotion = False | ||
| self.disable_memoryview_promotion = False | ||
| # Deprecated, Mypy only supports Python 3.9+ | ||
| self.force_uppercase_builtins = False | ||
| self.force_union_syntax = False | ||
| @@ -413,9 +415,12 @@ def __init__(self) -> None: | ||
| self.mypyc_skip_c_generation = False | ||
| def use_lowercase_names(self) -> bool: | ||
| warnings.warn( | ||
| "options.use_lowercase_names() is deprecated and will be removed in a future version", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Hmm we don't use the CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Not sure about it. I've removed all calls to this method from the mypy codebase itself. So we could even think about just removing it completely. My intention with the DeprecationWarning was to help plugin developers which might be using it. Then again, I don't know if any plugins actually use it. | ||
| return True | ||
| def use_or_syntax(self) -> bool: | ||
| if self.python_version >= (3, 10): | ||