Content-Length: 294381 | pFad | http://github.com/python/mypy/pull/19176/commits/c6a1d2cf7a2afb1ca559d71652c38f9c48c02289

86 Deprecated --force-uppercase-builtins flag by cdce8p · Pull Request #19176 · python/mypy · GitHub
Skip to content

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

Merged
merged 5 commits into from
Jun 5, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Always return true for use_lowercase_names
  • Loading branch information
cdce8p committed May 30, 2025
commit c6a1d2cf7a2afb1ca559d71652c38f9c48c02289
6 changes: 2 additions & 4 deletions mypy/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,11 @@ def __init__(self) -> None:

def use_lowercase_names(self) -> bool:
warnings.warn(
"options.use_lowercase_names is deprecated and will be removed in a future version",
"options.use_lowercase_names() is deprecated and will be removed in a future version",
DeprecationWarning,
stacklevel=2,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm we don't use the warnings module much since mypy is usually used on the command line. This seems a bit inconsistent with existing behavior, so maybe this should reverted. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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
return True

def use_or_syntax(self) -> bool:
if self.python_version >= (3, 10):
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/mypy/pull/19176/commits/c6a1d2cf7a2afb1ca559d71652c38f9c48c02289

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy