Replace List[X]
with list[X]
in docs
#11450
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As well as
Dict[X, Y]
->dic[X, Y]
, etc.This is a follow-up to #11377, where
just a single page of the docs was transitioned.
I did a grep through the docs/ directory for anything
matching "List[", "Dict[", "Tuple[", and "Set["
and corrected any examples. Perhaps I missed something, but
my goal was to clean all of the docs.
I tried to strike a balance of how explicit to be: In places related
to collections, such as the "Explicit types for collections" section
of
type_inference_and_annotations.rst
, I keptin notes about the differences
between
List
andlist
. But in most examplesthat were focused
on some other topic, I just deleted any reference to
typing.List
. I thought any notes there wouldjust add noise.
There also is a correction to
command_line.rst
, I tested using--disallow-any-generics
withlist[int]
and it works fine.There are a few typos and style fixes scattered throughout as well when
I touched them.
Test Plan
CI looks like it passed.