[issue47235] Clarify that `assret_called_once_with` sample code is intended typo
New submission from Mariatta <mariatta@python.org>: In unittest.mock documentation, there is an example code which intentionally contains typo. Source: https://github.com/python/cpython/blame/main/Doc/library/unittest.mock.rst#L... We've received quite a number of false "bug report" regarding this text. Basically people saw the sample code containing `assret` then they rushed to create an issue/PR, before actually reading the rest of the section. This typo was intentionally placed there, so it should not be fixed. However since this is definitely confusing to readers, perhaps the documentation should be improved. On Discord, Brandt suggested to add a comment on the sample code like: ``` # Intended typo! ``` so hopefully people will stop trying to fix it. Previous false "bug reports": bpo-35789 bpo-38700 ---------- assignee: docs@python components: Documentation messages: 416826 nosy: Mariatta, docs@python priority: normal severity: normal stage: needs patch status: open title: Clarify that `assret_called_once_with` sample code is intended typo versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
Gregory P. Smith <greg@krypto.org> added the comment: LOL... we didn't anticipate this happening when adding the commonly found typo detection feature. ---------- assignee: docs@python -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
Change by Gregory P. Smith <greg@krypto.org>: ---------- keywords: +patch pull_requests: +30401 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32348 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
Gregory P. Smith <greg@krypto.org> added the comment: New changeset ac1fb07b6ecb6b93446484f52894914e5199de63 by Gregory P. Smith in branch 'main': bpo-47235: Note where a typo is intentional in code. (GH-32348) https://github.com/python/cpython/commit/ac1fb07b6ecb6b93446484f52894914e519... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +30415 pull_request: https://github.com/python/cpython/pull/32367 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +30416 pull_request: https://github.com/python/cpython/pull/32368 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
Change by Gregory P. Smith <greg@krypto.org>: ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 3856b4995ec0e632d47b733cdecb5183ac830568 by Miss Islington (bot) in branch '3.10': bpo-47235: Note where a typo is intentional in code. (GH-32348) https://github.com/python/cpython/commit/3856b4995ec0e632d47b733cdecb5183ac8... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 770780e63e2a99f842670ef901a257ba64293d6b by Miss Islington (bot) in branch '3.9': bpo-47235: Note where a typo is intentional in code. (GH-32348) https://github.com/python/cpython/commit/770780e63e2a99f842670ef901a257ba642... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47235> _______________________________________
participants (3)
-
Gregory P. Smith
-
Mariatta
-
miss-islington