Infer members of ``Enums`` as instances of the ``Enum`` they belong to
Steps
- [x] For new features or bug fixes, add a ChangeLog entry describing what your PR does.
- [x] Write a good description on what the PR does.
Description
Closes #744
Also partially refs https://github.com/PyCQA/astroid/issues/142.
We need some way to store attributes that are specific to an individual instance. I'm not sure if this is the best way so I'm open to feedback!
Type of Changes
| Type | |
|---|---|
| ✓ | :bug: Bug fix |
| ✓ | :sparkles: New feature |
Pull Request Test Coverage Report for Build 2624305299
- 38 of 38 (100.0%) changed or added relevant lines in 3 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.005%) to 92.124%
| Totals | |
|---|---|
| Change from base Build 2624303150: | -0.005% |
| Covered Lines: | 9439 |
| Relevant Lines: | 10246 |
💛 - Coveralls
Marking as draft as there seem to be changes to this in 3.12 and possibly in 3.11:
https://github.com/python/cpython/issues/93910
Perhaps we should retain old behaviour.
A decision was made to revert the change in: https://github.com/python/cpython/issues/93910
So, this is still valid for 3.11.
It's blocked by https://github.com/PyCQA/astroid/pull/1689 which is a bug fix that is necessary for the change here but I think this can already be reviewed.