-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google sync #1620
Merged
Merged
Google sync #1620
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PiperOrigin-RevId: 625414033
PiperOrigin-RevId: 625414202
Also removes a Python 2 TODO that I happened to spot while looking at our current implementation of __build_class__. PiperOrigin-RevId: 625451422
PiperOrigin-RevId: 625487997
PiperOrigin-RevId: 625493532
Largely ported from abstract.function.Args.simplify, with a few changes because we don't handle indefinite iterables well yet, and refactored a bit to be easier to read and type check. Not tested for now because it also needs changes to LIST_EXTEND and a few other places to handle unpacking of `Any` better, and this change was getting long enough already. Added a skipped test that works in the execution phase, but not the analyse-with-fake-args phase. PiperOrigin-RevId: 625859869
PiperOrigin-RevId: 625877986
Merges posargs and starargs before handling splats, and does not replace splats with Any when matching args since we might want to forward them through several function calls. PiperOrigin-RevId: 626107538
- Replaces `internal.ConstKeyDict` with `internal.FunctionArgsDict` - Adds better support for indefinite `containers.Dict` and conversion between `Dict` and `FunctionArgsDict` - Fixes balancing of args between `kwargs` and `**args` in the arg mapper PiperOrigin-RevId: 626473976
PiperOrigin-RevId: 626492628
The `abstract.Dict` and `abstract.List` containers now only get their update methods called with a well-formed Dict/List PiperOrigin-RevId: 626520407
Adds the code needed to detect and call a custom implementation of type.__new__. An implementation of EnumMeta.__new__ will come in a later CL. Also fixes a minor issue where convert.py was failing to add modules and class prefixes to method names. PiperOrigin-RevId: 626545872
Both SimpleFunction and BoundFunction are subclasses of BaseFunction. PiperOrigin-RevId: 626560114
…e file. frame.py is already sort of long and will only get longer as we add more opcodes. This pulls most of the function calling code, which is fairly self-contained, into a separate file. PiperOrigin-RevId: 626664567
Replaces `A[X]` with `A`, mostly so code with subscripted type annotations can work without crashing. PiperOrigin-RevId: 627133846
PiperOrigin-RevId: 627195965
I started out by trying to implement overlays following our current design, with an overlay module containing overlay members, but I realized that this quickly becomes a pain if you want to replace a method of a class (e.g., to get at EnumMeta.__new__, I need to create overlay objects for the enum module, the EnumMeta class, and finally the EnumMeta.__new__ method). Here's a potential alternative design that involves using decorators to "register" individual objects as overlays and having convert.py do overlay registry lookups. Let me know what you think. PiperOrigin-RevId: 627541189
Removes the 'indefinite' attribute from abstract.Dict and adds it to abstract.FunctionArgTuple. This way, FunctionArgTuple and FunctionArgDict have a fully consistent typing story, but the general Tuple and Dict representations are kept relatively simple. I reran ./rewrite/tests/run.sh, and this change has no effect on our pass/fail/error numbers. PiperOrigin-RevId: 627558177
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.