Skip to content
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

Document force_union_syntax and force_uppercase_builtins #16048

Merged
merged 3 commits into from Sep 5, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Sep 5, 2023

Users don't know about them: typeddjango/pytest-mypy-plugins#126
Since they are quite important for testing, I think that it is a must to include them.

Comment on lines 819 to 824
.. confval:: force_lowercase_builtins

:type: boolean
:default: False

Force to use ``List`` instead of ``list`` .
Copy link
Member

Choose a reason for hiding this comment

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

Same comment as with force_union_syntax -- it looks like this option just impacts whether or not the messages mypy displays to the user use PEP-585 syntax. Also: the config option is force_uppercase_builtins, not force_lowercase_builtins

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is just about messages. This is why I put these two in "Configuring error messages" category. Is there any better way to describe them?

Copy link
Member

Choose a reason for hiding this comment

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

This is why I put these two in "Configuring error messages" category.

Ah, I didn't spot that, sorry!

Is there any better way to describe them?

I think "in error messages" is a useful qualifier -- have made some suggestions in review comments 👍

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

How about this?

docs/source/config_file.rst Outdated Show resolved Hide resolved
docs/source/config_file.rst Outdated Show resolved Hide resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@sobolevn sobolevn changed the title Document force_union_syntax and force_lowercase_builtins Document force_union_syntax and force_uppercase_builtins Sep 5, 2023
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

thanks!

@sobolevn sobolevn merged commit 5d9d13e into master Sep 5, 2023
2 checks passed
@sobolevn sobolevn deleted the document-force-options branch September 5, 2023 11:38
@AlexWaygood
Copy link
Member

Should we also document these as command-line options? It looks like --force-uppercase-builtins and --force-union-syntax work fine on the command line. Maybe entries should be added to command_line.rst?

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.

None yet

2 participants