-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
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,6 +415,11 @@ 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, | ||
) | ||
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 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. |
||
if self.python_version >= (3, 9): | ||
return not self.force_uppercase_builtins | ||
return False | ||
|
Uh oh!
There was an error while loading. Please reload this page.