@@ -425,6 +425,7 @@ follow_imports = skip
425
425
[out]
426
426
main.py:2: note: Revealed type is "Any"
427
427
main.py:4: note: Revealed type is "Any"
428
+ == Return code: 0
428
429
429
430
[case testConfigFollowImportsError]
430
431
# cmd: mypy main.py
@@ -517,7 +518,7 @@ reveal_type(missing.x) # Expect Any
517
518
ignore_missing_imports = True
518
519
[out]
519
520
main.py:2: note: Revealed type is "Any"
520
-
521
+ == Return code: 0
521
522
522
523
[case testFailedImportOnWrongCWD]
523
524
# cmd: mypy main.py
@@ -654,15 +655,26 @@ python_version = 3.6
654
655
[file int_pow.py]
655
656
a = 1
656
657
b = a + 2
657
- reveal_type(a**0) # N: Revealed type is "Literal[1]"
658
- reveal_type(a**1) # N: Revealed type is "builtins.int"
659
- reveal_type(a**2) # N: Revealed type is "builtins.int"
660
- reveal_type(a**-0) # N: Revealed type is "Literal[1]"
661
- reveal_type(a**-1) # N: Revealed type is "builtins.float"
662
- reveal_type(a**(-2)) # N: Revealed type is "builtins.float"
663
- reveal_type(a**b) # N: Revealed type is "Any"
664
- reveal_type(a.__pow__(2)) # N: Revealed type is "builtins.int"
665
- reveal_type(a.__pow__(a)) # N: Revealed type is "Any"
658
+ reveal_type(a**0)
659
+ reveal_type(a**1)
660
+ reveal_type(a**2)
661
+ reveal_type(a**-0)
662
+ reveal_type(a**-1)
663
+ reveal_type(a**(-2))
664
+ reveal_type(a**b)
665
+ reveal_type(a.__pow__(2))
666
+ reveal_type(a.__pow__(a))
667
+ [out]
668
+ int_pow.py:3: note: Revealed type is "Literal[1]"
669
+ int_pow.py:4: note: Revealed type is "builtins.int"
670
+ int_pow.py:5: note: Revealed type is "builtins.int"
671
+ int_pow.py:6: note: Revealed type is "Literal[1]"
672
+ int_pow.py:7: note: Revealed type is "builtins.float"
673
+ int_pow.py:8: note: Revealed type is "builtins.float"
674
+ int_pow.py:9: note: Revealed type is "Any"
675
+ int_pow.py:10: note: Revealed type is "builtins.int"
676
+ int_pow.py:11: note: Revealed type is "Any"
677
+ == Return code: 0
666
678
667
679
[case testDisallowAnyGenericsBuiltinCollections]
668
680
# cmd: mypy m.py
@@ -1484,3 +1496,12 @@ pass
1484
1496
[out]
1485
1497
Warning: --enable-recursive-aliases is deprecated; recursive types are enabled by default
1486
1498
== Return code: 0
1499
+
1500
+ [case testNotesOnlyResultInExitSuccess]
1501
+ # cmd: mypy a.py
1502
+ [file a.py]
1503
+ def f():
1504
+ x: int = "no"
1505
+ [out]
1506
+ a.py:2: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs
1507
+ == Return code: 0
0 commit comments