Skip to content

Google sync#1329

Merged
rchen152 merged 9 commits into
mainfrom
google_sync
Dec 6, 2022
Merged

Google sync#1329
rchen152 merged 9 commits into
mainfrom
google_sync

Conversation

@rchen152

@rchen152 rchen152 commented Dec 6, 2022

Copy link
Copy Markdown
Contributor

No description provided.

rchen152 and others added 9 commits December 5, 2022 18:07
With the previous logic, if the module prefix didn't have '.' in it, we would
raise a KeyError even though it should have been found.

PiperOrigin-RevId: 492557921
… possible.

I found user code that is doing stuff like:
  T1 = TypeVar('T1')
  T2 = TypeVar('T2', T1)
=/ Pytype was just silently downgrading types to Any. It's better to warn the
user that this is invalid. However, converting to Any as soon as we notice an
invalid TypeVar causes follow-on errors when attempting to use that TypeVar in
a generic class definition. As long as we have the TypeVar name, we can instead
create an unbounded, unconstrained TypeVar.

PiperOrigin-RevId: 492571068
The abstract matcher already applies these expansions (parameter type `float`
accepts both `int` and `float`, etc.), so the only thing
ExpandCompatibleBuiltins was doing was over-applying the expansions to things
like attributes and variables.

PiperOrigin-RevId: 492574853
builtins.type.__new__ and subprocess.Popen.__new__ have similar custom
implementations. This change creates a new base class for them both to inherit
from. For now, the _METHOD_NAME attribute is unnecessary (since it's always
__new__), but in the upcoming typeshed update, typeshed switches to defining
Popen.__init__, so we'll soon need this attribute. This will also make it
easier to add a custom implementation of abc.ABCMeta.__new__, which again will
be needed for updating typeshed.

PiperOrigin-RevId: 492589488
They need to be annotated as tuple and dict, not Any.

PiperOrigin-RevId: 493121382
- Adds a "class" field to Cytoscape nodes, making it much easier to filter them.
- Adds a little bit of node separation in the dagre layout engine, so nodes don't stack up as much. Makes labels easier to read, at the cost of a slightly wider tree.
- Fixes a small nit in cfg_visualizer.py re: unnecessary variables.

PiperOrigin-RevId: 493161863
@rchen152 rchen152 merged commit e67ade6 into main Dec 6, 2022
@rchen152 rchen152 deleted the google_sync branch December 6, 2022 02:58
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.

3 participants