Tags: facebook/pyre-check
Tags
Add a hint about disabling model verification errors Summary: I imagine some open source users give up after seeing model verification errors. We should recommend using `--no-verify` in those cases. For instance, I'm trying Pysa on Zulip and some of our django models seem to error (maybe some are outdated?). Using `--no-verify` allows to continue the analysis and ignore those. Reviewed By: tianhan0 Differential Revision: D77726788 fbshipit-source-id: 7873fbf76ce7a1f3b02a527f4e2ee8ac50ca6843
Store type preconditions for statements that lead to the unreachable … …state Summary: We currently have a bug in Pysa where we are missing type information in some statements. It looks like local type annotations are not saved when the statement leads to the unreachable state. For instance, this can happen in `if isinstance(x, int):` when Pyre is smart enough to know that `x` will always be an int. Reviewed By: tianhan0 Differential Revision: D75079648 fbshipit-source-id: 1a78d426326b7d438e26d82cf4957537ac27a348
Prevent users from shadowing `builtins.pyi` in ptt Summary: When using buck-based per-target type checking, we realised that it is possible for users, by setting `base_module = ''` and having an `__init__.py`, to shadow `builtins.py`. This is pretty confusing because there's no user-visible indication that this is happening, and we just get tons of type errors on all the builtin types being undefined. Reviewed By: grievejia Differential Revision: D65076559 fbshipit-source-id: d1ea05c3d0b5c6a8b2e114ba42fb7b81e2f1f1a8
sanitize type annotation in error message Summary: as pointed out by grievejia some things like type variables are rendered poorly when using `Expression.show`, so this diff sanitizes them first see the conformance output for changes Reviewed By: grievejia Differential Revision: D59039786 fbshipit-source-id: d9b20d472bec2fdd1a8af17c80cd3b1e2558f34b
Guard invalid python annotations for 3.8 / 3.9 (#848) Summary: Pull Request resolved: #848 This is blocking an open source release. Note: there's a test failure still in OSS in one of these tests. We do need to fix that, but unlike using illegal-for-python-3.9 syntax it doesn't make Pyre unreleasable. Reviewed By: connernilsen Differential Revision: D57218457 fbshipit-source-id: 4691f2ef8be0f88effb9ce0a490d82e8fda2fa35
Use Subscript-compatible logic for `__setitem__` in typeCheck.ml Summary: In order to make it easy to roll out the sweeping changes when I add a Subscript node to the AST and cut over `__getitem__` in the parser, I first want to make sure existing uses of the `special = true` `__getitem__` are always handled in a way that is: - distinct from the "vanilla" `Expression.Call` case - compatible with what Subscript will get us, which is just `base` and `index` (so basically, don't use the `callee` or other parts of the `__getitem__` `Call` node that won't exist after cutting over) This diff makes that change in the part of `typeCheck.ml` where we are handling subscript assignment targets: only rely on `base` and `index` here when constructing synthetic `__setitem__` call data, so that we'll be able to just drop in a `Subscript` match with the same body. Reviewed By: yangdanny97 Differential Revision: D57113190 fbshipit-source-id: c03e595a7c4a33bc910a0de32b73e57a51436e65
Use DaemonStatus to encapsulate time + connection status Summary: We always want both the connection status before and information about how long it has been since the server is ready; this combination of information makes it much easier to judge how big a problem availability is, because - we can't decide whether incremental status is bad or not *at all* without a timer, since it's expected that we'll be briefly busy - even for other statuses like starting, it's very helpful to have a record of how long start took; this, for example, can help us distinguish between an availability problem due primarily to long start times versus a problem due primarilily to frequent deamon (or persistent) restarts Putting these fields in the same dataclass makes it easier to ensure we always do the right thing, and that the logging is consistent across all telemetry events. It's worth noting that I caught another bug here: we weren't logging status in the telemetry for type coverage; this isn't a big deal today but it could be one if we ever start seeing heavy use of expression-level coverage. Reviewed By: grievejia Differential Revision: D43244195 fbshipit-source-id: d5ff1b0a39e2b09e3873a3131373a7f466c77d5d
automatic update for [email protected] Reviewed By: antonk52 Differential Revision: D39209227 fbshipit-source-id: be368d4d7cb0b27ba86606d08f813b32c652155f
PreviousNext