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

Minor doc issue: dataclasses.KW_ONLY not documented as inspected by dataclass() #99026

Closed
Dutcho opened this issue Nov 2, 2022 · 2 comments · Fixed by #100798
Closed

Minor doc issue: dataclasses.KW_ONLY not documented as inspected by dataclass() #99026

Dutcho opened this issue Nov 2, 2022 · 2 comments · Fixed by #100798
Assignees
Labels
docs Documentation in the Doc dir easy

Comments

@Dutcho
Copy link

Dutcho commented Nov 2, 2022

dataclasses documentation

According to dataclasses documentation, the only places "where dataclass() inspects a type annotation" are:

However, dataclasses.KW_ONLY logically must be (and actually is) the third place.

It's only a minor inconsistency, but it can be easily remedied (in a future-proof way, if ever a fourth, etc. place would be added) by changing:

(italics only to show the difference, not intended in the change)

Linked PRs

@Dutcho Dutcho added the docs Documentation in the Doc dir label Nov 2, 2022
@exitflynn
Copy link
Contributor

exitflynn commented Jan 6, 2023

the issue has been assigned but i can't see any activity, i was wondering if i could get this done? 🤠

@ericvsmith
Copy link
Member

Sure. Create a PR and I'll look at it.

ericvsmith pushed a commit that referenced this issue Jan 6, 2023
…h-100798)

update dataclasses docs for when annotations are inspected
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 6, 2023
…cted (pythongh-100798)

update dataclasses docs for when annotations are inspected
(cherry picked from commit 659c260)

Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 6, 2023
…cted (pythongh-100798)

update dataclasses docs for when annotations are inspected
(cherry picked from commit 659c260)

Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
miss-islington added a commit that referenced this issue Jan 6, 2023
…h-100798)

update dataclasses docs for when annotations are inspected
(cherry picked from commit 659c260)

Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
miss-islington added a commit that referenced this issue Jan 6, 2023
…h-100798)

update dataclasses docs for when annotations are inspected
(cherry picked from commit 659c260)

Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants