Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude unassigned type-annotated class attributes from enum __member…
…s__ 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 <jacobtylerwalls@gmail.com> * 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] <support@github.com> 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] <support@github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information