Skip to content

Checker for unguarded-next-called-without-default for next called without catching StopIteration and without default value in python 3.7+ #4725

@Pierre-Sassoulas

Description

@Pierre-Sassoulas

Is your feature request related to a problem? Please describe

StopIteration exceptions raised directly or indirectly in coroutines
and generators are transformed into RuntimeError exceptions for python
3.7+.

Additional context

We missed one next in astroid when doing pylint-dev/astroid#1081 and it resulted in the avoidable #4723 in astroid 2.6.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    CheckersRelated to a checkerEnhancement ✨Improvement to a componentNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions