Skip to content

Commit

Permalink
Upgrade pyre version
Browse files Browse the repository at this point in the history
Summary:
We are using a very old version of pyre. Let's upgrade to a newer one.
This should fix some of our Github Action failures

Differential Revision: D59745766

fbshipit-source-id: 381cc38aad37ceeb50e5304396957c4ecb8f092a
  • Loading branch information
arthaud authored and facebook-github-bot committed Jul 15, 2024
1 parent f60b49e commit bf4f29e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pyre_configuration
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@
"."
],
"strict": true,
"version": "0.0.101710846845"
"version": "0.0.101720437199"
}
3 changes: 2 additions & 1 deletion sapp/pipeline/database_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
TRun = TypeVar("TRun", bound=Run)


# pyre-fixme[13]: Attribute `summary` is never initialized.
class DatabaseSaver(PipelineStep[TraceGraph, RunSummary], Generic[TRun]):
def __init__(
self,
Expand All @@ -55,7 +54,9 @@ def __init__(
self.primary_key_generator, extra_saving_classes=extra_saving_classes
)
self.dry_run = dry_run
# pyre-fixme[13]: Attribute `graph` is never initialized.
self.graph: TraceGraph
# pyre-fixme[13]: Attribute `summary` is never initialized.
self.summary: Summary

@log_time
Expand Down
4 changes: 2 additions & 2 deletions sapp/pipeline/model_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
log: logging.Logger = logging.getLogger("sapp")


# pyre-fixme[13]: Attribute `graph` is never initialized.
# pyre-fixme[13]: Attribute `summary` is never initialized.
class ModelGenerator(PipelineStep[DictEntries, TraceGraph]):
def __init__(
self,
Expand All @@ -62,7 +60,9 @@ def __init__(
skip_traces: bool = False,
) -> None:
super().__init__()
# pyre-fixme[13]: Attribute `summary` is never initialized.
self.summary: Summary
# pyre-fixme[13]: Attribute `graph` is never initialized.
self.graph: TraceGraph
self.visited_frames: Dict[int, Set[int]] = {} # frame id -> leaf ids
self.record_meta_run_issue_instances: bool = record_meta_run_issue_instances
Expand Down
4 changes: 3 additions & 1 deletion sapp/pipeline/propagate_context_to_leaf_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ def __init__(self) -> None:
TaintKindToState = Dict[int, PerTaintKindState]


class PropagateContextToLeafFrames(PipelineStep[TraceGraph, TraceGraph]): # pyre-fixme[13]
class PropagateContextToLeafFrames(PipelineStep[TraceGraph, TraceGraph]):
"""For all issues matching a certain code, propagate features matching a
pattern to all reachable leaf frames for a particular frame_kind."""

def __init__(
self, issue_code: int, feature_pattern: str, frame_kind: TraceKind
) -> None:
super().__init__()
# pyre-fixme[13]: Attribute `summary` is never initialized.
self.summary: Summary
# pyre-fixme[13]: Attribute `graph` is never initialized.
self.graph: TraceGraph
self.feature_pattern = feature_pattern
self.issue_code = issue_code
Expand Down
4 changes: 3 additions & 1 deletion sapp/pipeline/propagate_to_crtex_anchors.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ def __init__(self) -> None:
SinkToState = Dict[int, PerSinkState]


class PropagateToCRTEXAnchors(PipelineStep[TraceGraph, TraceGraph]): # pyre-fixme[13]
class PropagateToCRTEXAnchors(PipelineStep[TraceGraph, TraceGraph]):
"""For all issues propagate source kinds and features to all reachable frames
leading to sinks and propagate features to leaf sinks with anchor ports.
"""

def __init__(self, propagate_sources: bool, propagate_features: bool) -> None:
super().__init__()
# pyre-fixme[13]: Attribute `summary` is never initialized.
self.summary: Summary
# pyre-fixme[13]: Attribute `graph` is never initialized.
self.graph: TraceGraph
self.propagate_sources = propagate_sources
self.propagate_features = propagate_features
Expand Down
2 changes: 1 addition & 1 deletion sapp/ui/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class SimilarIssueResultType(graphene.ObjectType):
score = graphene.Float()


# pyre-ignore[13]: unitialized class attribute
class IssueQueryResultType(graphene.ObjectType):
# pyre-fixme[13]: Attribute `concatenated_features` is never initialized.
concatenated_features: str

class Meta:
Expand Down

0 comments on commit bf4f29e

Please sign in to comment.