New submission from Mohamed Moselhy look4d@gmail.com:
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).
---------- assignee: docs@python components: Documentation files: screen.png messages: 392271 nosy: docs@python, eric.araujo, ezio.melotti, mdk, moselhy, willingc priority: normal severity: normal status: open title: documentation: no spacing around default args in annotated function versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49998/screen.png
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Change by Mohamed Moselhy look4d@gmail.com:
---------- keywords: +patch pull_requests: +24393 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25702
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Terry J. Reedy tjreedy@udel.edu added the comment:
From PEP 8:
right: label: str = '<unknown>' wrong: result: int=0 # No spaces around equality sign
current doc: quantity_on_hand: int=0):
---------- assignee: docs@python -> terry.reedy nosy: +terry.reedy versions: -Python 3.11, Python 3.7
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Change by miss-islington mariatta.wijaya+miss-islington@gmail.com:
---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +24458 pull_request: https://github.com/python/cpython/pull/25765
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Change by miss-islington mariatta.wijaya+miss-islington@gmail.com:
---------- pull_requests: +24459 pull_request: https://github.com/python/cpython/pull/25766
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Terry J. Reedy tjreedy@udel.edu added the comment:
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/e726a902b7c73a7056b7421d801e47ffff2...
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Terry J. Reedy tjreedy@udel.edu added the comment:
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/e48405a9be067d50d6d0d83dc22013fc68f...
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Terry J. Reedy tjreedy@udel.edu added the comment:
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/606bb1c77c66eca081d03374ad4b53d9e60...
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________
Julien Palard julien+python@palard.fr added the comment:
Thanks Mohamed for the issue and Terry for fixing it.
---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43971 _______________________________________