"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "analysis/test/integration/annotationTest.ml" between
pyre-check-0.0.53.tar.gz and pyre-check-0.0.54.tar.gz

About: Pyre is a performant type checker for Python (ships with Pysa, a security focused static analysis tool).

annotationTest.ml  (pyre-check-0.0.53):annotationTest.ml  (pyre-check-0.0.54)
skipping to change at line 172 skipping to change at line 172
def foo() -> Foo["Herp"]: def foo() -> Foo["Herp"]:
return 1 return 1
|} |}
[ [
"Missing return annotation [3]: Return type must be specified as type othe r than `Any`."; "Missing return annotation [3]: Return type must be specified as type othe r than `Any`.";
"Missing parameter annotation [2]: Parameter `other` has no type specified ."; "Missing parameter annotation [2]: Parameter `other` has no type specified .";
"Unbound name [10]: Name `Herp` is used but not defined in the current sco pe."; "Unbound name [10]: Name `Herp` is used but not defined in the current sco pe.";
]; ];
assert_strict_type_errors
{|
import typing as t
def foo() -> t.Set:
return set()
|}
["Invalid type parameters [24]: Generic type `set` expects 1 type parameter.
"];
(* Attributes *) (* Attributes *)
assert_type_errors assert_type_errors
{| {|
class Foo: class Foo:
x: int = 1 x: int = 1
y: Derp = 1 y: Derp = 1
def __init__(self) -> None: def __init__(self) -> None:
self.z: Herp = 1 self.z: Herp = 1
|} |}
 End of changes. 1 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)