]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44929: [Enum] Fix global repr (GH-27789)
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Wed, 25 Aug 2021 14:24:32 +0000 (15:24 +0100)
committerGitHub <noreply@github.com>
Wed, 25 Aug 2021 14:24:32 +0000 (07:24 -0700)
commit24da544014f78e6f1440d5ce5c2d14794a020340
tree9f2dd662a313c14ac9ae001b5839c0926b2242dd
parenta3c11cebf174e0c822eda8c545f7548269ce7a25
bpo-44929: [Enum] Fix global repr (GH-27789)

* Fix typo in __repr__ code

* Add more tests for global int flag reprs

* use last module if multi-module string
  - when an enum's `__module__` contains several module names, only
     use the last one

Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Core and Builtins/2021-08-16-23-16-17.bpo-44929.qpMEky.rst [new file with mode: 0644]