-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
docutils: Correct 'parsers.rst.directives.format_values' #11719
Conversation
This popped up in github.com/click-contrib/sphinx-click. To the best of my knowledge, you can call |
This comment has been minimized.
This comment has been minimized.
There's one issue with these stubs - reported at [1] - that we ignore. Otherwise, this is pretty simple. [1] python/typeshed#11719 Signed-off-by: Stephen Finucane <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! But since – as you write – any value can be provided, confusingly object
is the correct type, not Any
. Any
is the typing escape hatch, it basically means "we can't express this type using the current type system". While object
means "we accept literally every possible value".
In this case, it makes no differences practically speaking, but we try to be correct here.
TIL! Will update 🙂 |
This helper function uses printf-style formatting to print output, therefore it shouldn't be limited to strings: calling e.g. format_values(['a', 'b', None]) is perfectly reasonable. Signed-off-by: Stephen Finucane <[email protected]>
5726c48
to
c466079
Compare
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
[1] was merged. [1] python/typeshed#11719 Signed-off-by: Stephen Finucane <[email protected]>
This helper function uses printf-style formatting to print output, therefore it shouldn't be limited to strings: calling e.g.
is perfectly reasonable.
Signed-off-by: Stephen Finucane [email protected]