@@ -1600,6 +1600,61 @@ def testNonAscii() -> None:
1600
1600
{'style' : 'numpy' },
1601
1601
[],
1602
1602
),
1603
+ (
1604
+ '23_bare_return_stmt_with_yield/google.py' ,
1605
+ {
1606
+ 'style' : 'google' ,
1607
+ 'argTypeHintsInDocstring' : False ,
1608
+ 'checkYieldTypes' : False ,
1609
+ 'checkReturnTypes' : True ,
1610
+ },
1611
+ [
1612
+ 'DOC203: Function `my_func_2` return type(s) in docstring not consistent with '
1613
+ "the return annotation. Return annotation types: ['None']; docstring return "
1614
+ "section types: ['']"
1615
+ ],
1616
+ ),
1617
+ (
1618
+ '23_bare_return_stmt_with_yield/google.py' ,
1619
+ {
1620
+ 'style' : 'google' ,
1621
+ 'argTypeHintsInDocstring' : False ,
1622
+ 'checkYieldTypes' : False ,
1623
+ 'checkReturnTypes' : False ,
1624
+ },
1625
+ [],
1626
+ ),
1627
+ (
1628
+ '23_bare_return_stmt_with_yield/google.py' ,
1629
+ {
1630
+ 'style' : 'google' ,
1631
+ 'argTypeHintsInDocstring' : False ,
1632
+ 'checkYieldTypes' : True ,
1633
+ 'checkReturnTypes' : True ,
1634
+ },
1635
+ [
1636
+ 'DOC404: Function `my_func_1` yield type(s) in docstring not consistent with '
1637
+ 'the return annotation. The yield type (the 0th arg in '
1638
+ 'Generator[...]/Iterator[...]): int; docstring "yields" section types:' ,
1639
+ 'DOC203: Function `my_func_2` return type(s) in docstring not consistent with '
1640
+ "the return annotation. Return annotation types: ['None']; docstring return "
1641
+ "section types: ['']" ,
1642
+ ],
1643
+ ),
1644
+ (
1645
+ '23_bare_return_stmt_with_yield/google.py' ,
1646
+ {
1647
+ 'style' : 'google' ,
1648
+ 'argTypeHintsInDocstring' : False ,
1649
+ 'checkYieldTypes' : True ,
1650
+ 'checkReturnTypes' : False ,
1651
+ },
1652
+ [
1653
+ 'DOC404: Function `my_func_1` yield type(s) in docstring not consistent with '
1654
+ 'the return annotation. The yield type (the 0th arg in '
1655
+ 'Generator[...]/Iterator[...]): int; docstring "yields" section types:' ,
1656
+ ],
1657
+ ),
1603
1658
],
1604
1659
)
1605
1660
def testEdgeCases (
@@ -1627,6 +1682,8 @@ def testPlayground() -> None:
1627
1682
filename = DATA_DIR / 'playground.py' ,
1628
1683
style = 'google' ,
1629
1684
skipCheckingRaises = True ,
1685
+ argTypeHintsInDocstring = False ,
1686
+ checkYieldTypes = False ,
1630
1687
)
1631
1688
expected = []
1632
1689
assert list (map (str , violations )) == expected
0 commit comments