"Fossies" - the Fresh Open Source Software Archive  

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

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

formatStringTest.ml  (pyre-check-0.0.54):formatStringTest.ml  (pyre-check-0.0.55)
skipping to change at line 22 skipping to change at line 22
let assert_type_errors = assert_type_errors ~context in let assert_type_errors = assert_type_errors ~context in
assert_type_errors {| assert_type_errors {|
def foo() -> None: def foo() -> None:
f'foo{1}' f'foo{1}'
|} []; |} [];
assert_type_errors assert_type_errors
{| {|
def foo() -> None: def foo() -> None:
f'foo{1 + "x"}' f'foo{1 + "x"}'
|} |}
["Incompatible parameter type [6]: `+` is not supported for operand types `i nt` and `str`."]; ["Unsupported operand [58]: `+` is not supported for operand types `int` and `str`."];
assert_type_errors assert_type_errors
{| {|
global_number: int = 1 global_number: int = 1
def foo() -> None: def foo() -> None:
f'foo{global_number + "x"}' f'foo{global_number + "x"}'
|} |}
["Incompatible parameter type [6]: `+` is not supported for operand types `i nt` and `str`."]; ["Unsupported operand [58]: `+` is not supported for operand types `int` and `str`."];
assert_type_errors assert_type_errors
{| {|
global_number: int = 1 global_number: int = 1
def foo() -> None: def foo() -> None:
f'foo{global_number + 2}' f'foo{global_number + 2}'
|} |}
[]; [];
assert_type_errors assert_type_errors
{| {|
def boo() -> int: def boo() -> int:
return 1 return 1
def foo() -> None: def foo() -> None:
f'{boo() + "x"}' f'{boo() + "x"}'
|} |}
["Incompatible parameter type [6]: `+` is not supported for operand types `i nt` and `str`."]; ["Unsupported operand [58]: `+` is not supported for operand types `int` and `str`."];
assert_type_errors {| assert_type_errors {|
def foo() -> None: def foo() -> None:
f'{{x}}' f'{{x}}'
|} []; |} [];
assert_type_errors assert_type_errors
{| {|
def foo() -> None: def foo() -> None:
f'{{{x}}}' f'{{{x}}}'
|} |}
["Unbound name [10]: Name `x` is used but not defined in the current scope." ] ["Unbound name [10]: Name `x` is used but not defined in the current scope." ]
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

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