Modify rule S5654: Fix a broken link (#4351)

This commit is contained in:
David Kunzmann 2024-09-30 14:38:32 +02:00 committed by GitHub
parent 835a5d06dc
commit f327e68410
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,9 +3,9 @@
As soon as the ``++yield++`` keyword is used the enclosing method or function becomes a generator. Thus ``++yield++`` should never be used in a function or method which is not intended to be a generator.
This rule raises an issue when ``++yield++`` or ``++yield from++`` are used in a function or method which is not a generator because:
This rule raises an issue when ``++yield from++`` or ``++yield++`` are used in a function or method which is not a generator because:
* the function/method's return type annotation is not [``++typing.Generator[...]++``|https://docs.python.org/3/library/typing.html#typing.Generator]
* the function/method's return type annotation is not https://docs.python.org/3/library/typing.html#typing.Generator[``++typing.Generator[...]++``]
* it is a special method which can never be a generator (ex: ``++__init__++``).