This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: documentation: no spacing around default args in annotated function
Type: Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: docs@python, eric.araujo, ezio.melotti, mdk, miss-islington, moselhy, terry.reedy, willingc
Priority: normal Keywords: patch

Created on 2021-04-29 00:34 by moselhy, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
screen.png moselhy, 2021-04-29 00:34
Pull Requests
URL Status Linked Edit
PR 25702 merged moselhy, 2021-04-29 00:35
PR 25765 merged miss-islington, 2021-04-30 23:07
PR 25766 merged miss-islington, 2021-04-30 23:07
Messages (6)
msg392271 - (view) Author: Mohamed Moselhy (moselhy) * Date: 2021-04-29 00:34
See https://www.python.org/dev/peps/pep-0008/#function-annotations

The first section of https://docs.python.org/3/library/dataclasses.html shows quantity_on_hand: int=0, when there should be spacing around the '=' according to PEP 8 (see link above).
msg392530 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-04-30 22:46
From PEP 8:
right:    label: str = '<unknown>'
wrong:    result: int=0  # No spaces around equality sign

current doc: quantity_on_hand: int=0):
msg392536 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-04-30 23:07
New changeset e726a902b7c73a7056b7421d801e47ffff255873 by Mohamed Moselhy in branch 'master':
bpo-43971: Add spaces around annotated arg default '=' (GH-25702)
https://github.com/python/cpython/commit/e726a902b7c73a7056b7421d801e47ffff255873
msg392549 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-05-01 00:30
New changeset e48405a9be067d50d6d0d83dc22013fc68f15657 by Miss Islington (bot) in branch '3.9':
bpo-43971: Add spaces around annotated arg default '=' (GH-25702)
https://github.com/python/cpython/commit/e48405a9be067d50d6d0d83dc22013fc68f15657
msg392550 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-05-01 00:31
New changeset 606bb1c77c66eca081d03374ad4b53d9e603dd9d by Miss Islington (bot) in branch '3.8':
bpo-43971: Add spaces around annotated arg default '=' (GH-25702)
https://github.com/python/cpython/commit/606bb1c77c66eca081d03374ad4b53d9e603dd9d
msg392593 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2021-05-01 13:28
Thanks Mohamed for the issue and Terry for fixing it.
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88137
2021-05-01 13:28:48mdksetstatus: open -> closed
resolution: fixed
messages: + msg392593

stage: patch review -> resolved
2021-05-01 00:31:08terry.reedysetmessages: + msg392550
2021-05-01 00:30:45terry.reedysetmessages: + msg392549
2021-04-30 23:07:21terry.reedysetmessages: + msg392536
2021-04-30 23:07:09miss-islingtonsetpull_requests: + pull_request24459
2021-04-30 23:07:04miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24458
2021-04-30 22:46:32terry.reedysetversions: - Python 3.7, Python 3.11
nosy: + terry.reedy

messages: + msg392530

assignee: docs@python -> terry.reedy
2021-04-29 00:35:50moselhysetkeywords: + patch
stage: patch review
pull_requests: + pull_request24393
2021-04-29 00:34:52moselhycreate