Miss Islington (bot)
0f97abf498
[3.13] gh-124269: Simplify typing.Annotated
docs (GH-130770) ( #131222 )
...
gh-124269: Simplify `typing.Annotated` docs (GH-130770)
---------
(cherry picked from commit e4ac196aaa
)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-14 09:53:03 +00:00
Miss Islington (bot)
ab749678e5
[3.13] Update links from typing.readthedocs.io to typing.python.org (GH-130877) ( #130883 )
...
Update links from typing.readthedocs.io to typing.python.org (GH-130877)
(cherry picked from commit 4f6218959e
)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2025-03-05 15:34:17 +00:00
Miss Islington (bot)
418021e229
[3.13] gh-129567: Add a note to typing.TypedDict
docs about name mangling (GH-130233) ( #130841 )
...
gh-129567: Add a note to `typing.TypedDict` docs about name mangling (GH-130233)
(cherry picked from commit 63ffb406bb
)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-03-04 15:21:11 +00:00
Miss Islington (bot)
3d8f5490e2
[3.13] gh-126543: Docs: change "bound type var" to "bounded" when used in the context of the 'bound' kw argument to TypeVar (GH-126584) ( #126657 )
...
(cherry picked from commit 434b29767f
)
Co-authored-by: Pedro Fonini <fonini@protonmail.ch>
2024-11-10 18:48:44 -08:00
Miss Islington (bot)
e532760f46
[3.13] Docs: improve generic typing.NamedTuple
example (GH-124739) ( #124764 )
...
Docs: improve generic `typing.NamedTuple` example (GH-124739)
(cherry picked from commit 76fbee642e
)
Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
2024-09-29 17:53:13 -07:00
Alex Waygood
9f2e6ca199
[3.13] gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs ( #124480 ) ( #124556 )
2024-09-25 17:29:48 -07:00
Miss Islington (bot)
8c0c3443f3
[3.13] gh-124120: Document Annotated.__origin__
(GH-124125) ( #124416 )
...
gh-124120: Document `Annotated.__origin__` (GH-124125)
(cherry picked from commit faef3fa653
)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-24 11:34:21 -07:00
Miss Islington (bot)
6867604781
[3.13] GH-103484: Fix permanently redirects reported by linkcheck (GH-124144) ( #124151 )
...
GH-103484: Fix permanently redirects reported by linkcheck (GH-124144)
Fix redirects reported by linkcheck, update docs conf.py checks.
(cherry picked from commit 0a32c6959c
)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-09-24 00:43:04 +00:00
Miss Islington (bot)
bbec2ea88f
[3.13] Fix "The Matrix" movie release year in typing.rst
(GH-123965) ( #123966 )
...
Fix "The Matrix" movie release year in `typing.rst` (GH-123965)
(cherry picked from commit 3bd942f106
)
Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-23 11:34:44 -07:00
Miss Islington (bot)
e62cb77c25
[3.13] gh-123523: Rework typing documentation for generators and coroutines, and link to it from collections.abc
docs (GH-123544) ( #123790 )
...
gh-123523: Rework typing documentation for generators and coroutines, and link to it from `collections.abc` docs (GH-123544)
(cherry picked from commit 56e4a417ce
)
Co-authored-by: Stanislav Terliakov <50529348+sterliakov@users.noreply.github.com>
2024-09-06 22:56:37 +02:00
Miss Islington (bot)
6cddf1a611
[3.13] gh-120661: improve example for basic type hints (GH-120934) ( #120987 )
...
gh-120661: improve example for basic type hints (GH-120934)
(cherry picked from commit bb057ea107
)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-06-25 09:25:29 +01:00
Miss Islington (bot)
d6791cd933
[3.13] Typing docs: normalize some indents in code examples (GH-120912) ( #120915 )
...
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
2024-06-23 16:31:40 +00:00
Miss Islington (bot)
d4e1d093d8
[3.13] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) ( #120575 )
...
gh-120572: add missing parentheses in TypeIs documentation (GH-120573)
(cherry picked from commit 1fa595963e
)
Co-authored-by: Nyuan Zhang <blueglassblock@outlook.com>
2024-06-16 05:51:29 +00:00
Miss Islington (bot)
cfec22ce19
[3.13] Improve documentation for typing.get_type_hints (GH-119928) ( #119943 )
...
- Explicit list of what it does that is different from
"just return __annotations__"
- Remove reference to PEP 563; adding the future import doesn't
do anything to type aliases, and in general it will never make
get_type_hints() less likely to fail.
- Remove example, as the Annotated docs already have a similar
example, and it's unbalanced to have one example about this
one edge case but not about other behaviors of the function.
(cherry picked from commit aa9fe98e06
)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-02 15:29:25 +00:00
Miss Islington (bot)
8f3fc01c4c
[3.13] [docs] TypeVarTuple default is keyword-only (GH-119215) ( #119224 )
...
(cherry picked from commit e406b399f9
)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2024-05-20 15:57:19 +00:00
Miss Islington (bot)
cbf064b096
[3.13] typing docs: Fix formatting issue (GH-119210) ( #119212 )
...
typing docs: Fix formatting issue (GH-119210)
(cherry picked from commit 72d07dd30b
)
Co-authored-by: David Foster <david@dafoster.net>
2024-05-20 15:08:49 +00:00
Miss Islington (bot)
8f31af68d0
[3.13] Format None, True, False and NotImplemented as literals (GH-118758) (GH-118792)
...
(cherry picked from commit 05c2fe1acd
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-08 19:55:12 +00:00
Jelle Zijlstra
71080b8a0f
gh-118660: Add second type parameter to (Async)ContextManager ( #118681 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-07 14:16:05 +00:00
Jelle Zijlstra
8419f01673
gh-118647: Add defaults to typing.Generator and typing.AsyncGenerator ( #118648 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-06 22:35:06 +00:00
Jelle Zijlstra
ca269e58c2
gh-116126: Implement PEP 696 ( #116129 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2024-05-03 06:17:32 -07:00
Nice Zombies
852263e108
gh-117492: Clarify documentation of typing.Never
( #117678 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-05-03 06:02:11 -07:00
Nice Zombies
78ba4cb758
gh-118030: Group definitions for ParamSpecArgs
and ParamSpecKwargs
in typing.rst
( #118154 )
2024-04-22 14:57:46 +00:00
Alex Waygood
1e3e7ce11e
gh-114053: Fix bad interaction of PEP-695, PEP-563 and `get_type_hints
` ( #118009 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-19 13:03:44 +00:00
Hugo van Kemenade
3375282bb8
Docs: add link roles with Sphinx extlinks ( #117850 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-15 21:22:00 +03:00
Jelle Zijlstra
f2132fcd2a
gh-117516: Implement typing.TypeIs ( #117517 )
...
See PEP 742.
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-04-09 10:50:37 +00:00
Shantanu
262445358e
Link to the Python type system specification ( #117400 )
2024-03-31 12:02:48 -07:00
Jelle Zijlstra
290330714b
gh-89547: typing.rst: Add note about change in behavior with ClassVar/Final ( #116686 )
2024-03-12 15:17:53 -07:00
Nikita Sobolev
df4784b3b7
gh-116127: PEP-705: Add ReadOnly
support for TypedDict
( #116350 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-12 07:49:39 -07:00
Serhiy Storchaka
0064dfa091
gh-115777: Fix double versionadded directives (GH-116269)
2024-03-05 17:41:53 +02:00
Kir
11ee912327
gh-113255: Clarify docs for typing.reveal_type
( #113286 )
...
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-12-20 17:21:23 +00:00
Jelle Zijlstra
8ab7ad6308
Glossary: Add "static type checker" ( #111837 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-08 14:38:36 +00:00
方糖
c3e19c3a62
gh-111729: update generic syntax for typing.Concatenate
sample code in Doc/library/typing.rst
( #111734 )
...
use new generic syntax
2023-11-06 16:53:17 -08:00
Nikita Sobolev
ccc8caa858
gh-111681: minor fixes to typing doctests; remove unused imports in test_typing
( #111682 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-03 12:23:33 +00:00
InSync
1198076447
gh-111151: Convert monospaced directives to :ref: ( #111152 )
2023-10-24 08:22:08 -07:00
Jelle Zijlstra
f49958c886
Enhance TypedDict docs around required/optional keys ( #109547 )
...
As discussed in comments to #109544 , the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
2023-09-27 10:35:46 -07:00
Heinz-Alexander Fuetterer
ef6d475db3
Fix typos in docs and comments ( #109619 )
2023-09-20 16:58:23 +00:00
nikkie
72b615ab01
Fix typo in typing docs: Remove redundant backtick ( #108559 )
2023-08-28 11:19:29 +00:00
Alexandru Mărășteanu
c8872f4285
Clarify Self
interaction with subclasses ( #107511 )
2023-08-01 13:20:25 -07:00
Michael The
a22ff8e11c
gh-105578: Document that AnyStr
is deprecated in py313 ( #107116 )
...
It will not be removed until Python 3.18.
2023-07-31 15:43:53 +00:00
Michael The
f877b32b87
gh-105578: Add more usage examples to typing.AnyStr
docs ( #107045 )
...
``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion
2023-07-31 16:23:08 +01:00
Rakesh Sabale
89fd4f4a3f
gh-107422: Remove outdated TypedDict
example from typing docs ( #107436 )
2023-07-29 17:04:46 +00:00
Alex Waygood
89ec0e9529
gh-106745: typing docs: Clarify that removal of PEP-585 aliases is not currently planned ( #106748 )
2023-07-14 19:49:02 +01:00
Alex Waygood
32718f908c
gh-106309: Deprecate typing.no_type_check_decorator ( #106312 )
2023-07-13 14:30:35 +01:00
Alex Waygood
ca8b55c7f5
gh-106461: typing: Consolidate docs on Callable
( #106462 )
2023-07-09 21:46:15 +01:00
Alex Waygood
3eeb8c8906
Improve typing docs on the type of class objects ( #106081 )
2023-06-26 00:13:48 -07:00
Eamon Tracey
8ef0ee4ebc
Typing docs: fix typo in annotating tuples comment ( #106048 )
2023-06-23 21:34:05 +01:00
Alex Waygood
968435ddb1
Typing docs: improve the guidance on annotating tuples ( #106021 )
2023-06-23 15:33:20 +01:00
Alex Waygood
4426279a43
typing docs: Improve the intro to each section ( #105901 )
2023-06-19 00:54:29 +01:00
Alex Waygood
da911a6b22
More reorganisation of the typing docs ( #105787 )
2023-06-15 06:52:18 +01:00
Alex Waygood
006a453205
Improve docs for typing.dataclass_transform
( #105792 )
2023-06-15 06:51:42 +01:00