Skip to content

Google sync#1318

Merged
rchen152 merged 5 commits into
mainfrom
google_sync
Nov 10, 2022
Merged

Google sync#1318
rchen152 merged 5 commits into
mainfrom
google_sync

Conversation

@rchen152

Copy link
Copy Markdown
Contributor

No description provided.

jerub and others added 5 commits November 10, 2022 14:26
…] type defintions correctly.

Testing showed that round-tripping Literal["\0"] did not work properly, as the
parser was using a simple regex to extract the string contents, which didn't
understand how to do backslash escapes appropriately.

Using the `ast` module by way of `pyi.evaluator.eval_string_literal(string)` we
interpret the string correctly.

PiperOrigin-RevId: 487285573
This way we don't have to expand the visibility of the former.

PiperOrigin-RevId: 487337632
* Fixes a bug where a local variable's original binding(s) weren't visible, by
  forwarding them to the node at which the TypeGuard function was called.
* Fixes a bug where TypeGuard did not work for globals that were annotated but
  not defined, by having vm._load_annotation update members and _var_names.

PiperOrigin-RevId: 487391804
PiperOrigin-RevId: 487622881
@rchen152 rchen152 merged commit b2dae8d into main Nov 10, 2022
@rchen152 rchen152 deleted the google_sync branch November 10, 2022 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants