@@ -312,7 +312,7 @@ def _checkClassDocstringAndConstructorDocstrings( # noqa: C901
312
312
313
313
classDocstring : str = getDocstring (parent_ )
314
314
315
- if len (initDocstring ) == 0 : # __init__() doesn't have its own docstring
315
+ if len (initDocstring ) == 0 : # __init__() doesn't have own docstring
316
316
# Check class docstring instead, because that's what we care
317
317
# about when checking the class constructor.
318
318
return classDocstring
@@ -831,8 +831,8 @@ def my_function(num: int) -> Generator[int, None, str]:
831
831
returnAnnoText = returnAnno .annotation ,
832
832
)
833
833
# If "Generator[...]" is put in the return type annotation,
834
- # we don't need a "Returns" section in the docstring. Instead,
835
- # we need a "Yields" section.
834
+ # we don't need a "Returns" section in the docstring.
835
+ # Instead, we need a "Yields" section.
836
836
if self .requireReturnSectionWhenReturningNothing :
837
837
violations .append (v201 )
838
838
elif retTypeInGenerator not in {'None' , 'NoReturn' }:
@@ -870,15 +870,15 @@ def my_function(num: int) -> Generator[int, None, str]:
870
870
yieldType : str | None = extract (
871
871
returnAnnoText = returnAnno .annotation ,
872
872
hasGeneratorAsReturnAnnotation = hasGenAsRetAnno ,
873
- hasIteratorOrIterableAsReturnAnnotation = hasIterAsRetAnno ,
873
+ hasIteratorOrIterableAsReturnAnnotation = hasIterAsRetAnno , # noqa: LN001
874
874
)
875
875
checkYieldTypesForViolations (
876
876
returnAnnotation = ReturnAnnotation (yieldType ),
877
877
violationList = violations ,
878
878
yieldSection = yieldSec ,
879
879
violation = v404 ,
880
880
hasGeneratorAsReturnAnnotation = hasGenAsRetAnno ,
881
- hasIteratorOrIterableAsReturnAnnotation = hasIterAsRetAnno ,
881
+ hasIteratorOrIterableAsReturnAnnotation = hasIterAsRetAnno , # noqa: LN001
882
882
requireYieldSectionWhenYieldingNothing = (
883
883
self .requireYieldSectionWhenYieldingNothing
884
884
),
0 commit comments