"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "analysis/attributeResolution.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).

attributeResolution.ml  (pyre-check-0.0.54):attributeResolution.ml  (pyre-check-0.0.55)
skipping to change at line 3674 skipping to change at line 3674
let resolved = resolve_with_locals ~locals:[] expression in let resolved = resolve_with_locals ~locals:[] expression in
{ {
Argument.WithPosition.position = index + 1; Argument.WithPosition.position = index + 1;
expression = Some expression; expression = Some expression;
kind; kind;
resolved; resolved;
} }
in in
List.mapi unresolved ~f:create_argument List.mapi unresolved ~f:create_argument
in in
let unpack sofar argument =
match argument with
| {
Argument.WithPosition.resolved = Tuple (Bounded (Concrete tuple_par
ameters));
kind = SingleStar;
position;
_;
} ->
let unpacked_arguments =
List.map tuple_parameters ~f:(fun resolved ->
{
Argument.WithPosition.expression = None;
kind = Positional;
resolved;
position;
})
in
List.concat [List.rev unpacked_arguments; sofar]
| _ -> argument :: sofar
in
let update_position index argument =
Argument.WithPosition.{ argument with position = index + 1 }
in
let arguments =
List.fold ~f:unpack ~init:[] arguments |> List.rev |> List.mapi ~f:u
pdate_position
in
let is_labeled = function let is_labeled = function
| { Argument.WithPosition.kind = Named _; _ } -> true | { Argument.WithPosition.kind = Named _; _ } -> true
| _ -> false | _ -> false
in in
let labeled_arguments, unlabeled_arguments = let labeled_arguments, unlabeled_arguments =
arguments |> List.partition_tf ~f:is_labeled arguments |> List.partition_tf ~f:is_labeled
in in
let self_argument = let self_argument =
self_argument self_argument
>>| (fun resolved -> >>| (fun resolved ->
 End of changes. 1 change blocks. 
0 lines changed or deleted 28 lines changed or added

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