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.

Author sobolevn
Recipients sobolevn
Date 2022-01-07.17:36:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641576989.34.0.689018716767.issue46296@roundup.psfhosted.org>
In-reply-to
Content
This condition can never be `True`: https://github.com/python/cpython/blob/b127e70a8a682fe869c22ce04c379bd85a00db67/Lib/enum.py#L222-L223

Why? Because: 
1. It is executed only when `if not enum_class._use_args_:`: https://github.com/python/cpython/blob/b127e70a8a682fe869c22ce04c379bd85a00db67/Lib/enum.py#L215
2. But, `enum_class._use_args_` will always be `False` for cases when `enum_class._member_type_` is `object`
3. It is defined here: https://github.com/python/cpython/blob/b127e70a8a682fe869c22ce04c379bd85a00db67/Lib/enum.py#L937

So, I guess that removing this condition can simplify the `enum.py`.
Coverage shows that this part is not tested.

I will send a PR shortly.
History
Date User Action Args
2022-01-07 17:36:29sobolevnsetrecipients: + sobolevn
2022-01-07 17:36:29sobolevnsetmessageid: <1641576989.34.0.689018716767.issue46296@roundup.psfhosted.org>
2022-01-07 17:36:29sobolevnlinkissue46296 messages
2022-01-07 17:36:29sobolevncreate