Commit 63cd8a1
Exclude unassigned type-annotated class attributes from enum __members__ container (#2263)
* Exclude type-annotated class attributes, which have no assigned value, from the ``__members__`` container of an ``Enum`` class.
Refs pylint-dev/pylint#7402
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix exising test.
The value if now `Uninferable` in the case of
an annotated attribute of an `enum.Enum` class with no assigned value.
* Update astroid/brain/brain_namedtuple_enum.py
Co-authored-by: Jacob Walls <[email protected]>
* Update tests.
* Update test: Use `infer()` instead of `inferred()`.
* Update type annotations of PEP 695 nodes (#2264)
These attributes cannot be none in real-world situations,
see python/cpython#106145.
* Update sphinx requirement from ~=7.0 to ~=7.1 (#2265)
Updates the requirements on [sphinx](https://github.com/sphinx-doc/sphinx) to permit the latest version.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES)
- [Commits](sphinx-doc/sphinx@v7.0.0...v7.1.1)
---
updated-dependencies:
- dependency-name: sphinx
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Ensure a node is inferred in the case when there is only one member.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Undo unintended changes.
---------
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jacob Walls <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent 38fc4aa commit 63cd8a1
File tree
3 files changed
+35
-0
lines changed- astroid/brain
- tests/brain
3 files changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
465 | 467 | | |
466 | 468 | | |
467 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
0 commit comments