Skip to content

Google sync#1008

Merged
rchen152 merged 18 commits into
masterfrom
google_sync
Sep 16, 2021
Merged

Google sync#1008
rchen152 merged 18 commits into
masterfrom
google_sync

Conversation

@rchen152

Copy link
Copy Markdown
Contributor

No description provided.

rchen152 and others added 15 commits September 15, 2021 19:06
PiperOrigin-RevId: 395756826
Whether the error appears on the decorator line or the classdef line changes
between versions. We should probably change pytype to pick a consistent
location, but for now, inheriting from object fixes this.

PiperOrigin-RevId: 395788178
See https://github.com/google/pytype/runs/3560609733?check_suite_focus=true.

pylint is complaining because Class._new_instance takes a 'container' argument.

PiperOrigin-RevId: 395788561
PiperOrigin-RevId: 395790403
This flag was already a no-op as of the release earlier today.

PiperOrigin-RevId: 395795803
The pyi file just records the default as "True" or "False" depending on whether
the field has a default or not, in keeping with the general practice around
variable defaults.

PiperOrigin-RevId: 395968657
This consolidates and avoids repeating some information.

PiperOrigin-RevId: 396401242
This makes enabling the enum overlay easier by allowing files that raise errors when analyzed by the overlay completely ignore the changes caused by the overlay.

Also fixes several other issues:
- enum_overlay: check that `_generate_next_value_` is a callable.
- test_enums: enable almost all tests by default.
- enum.pytd: clean up incorrect comments.

PiperOrigin-RevId: 396452142
… type.

Previously we were discarding bindings from `x` that did not match `type` but
not adding any new types. However, in keeping with the analogy to `assert
isinstance(x, type)`, we should simply discard existing bindings and create a
new one with the asserted type.

PiperOrigin-RevId: 396645440
Using two type stubs for enum lead to issues with names. Instead, use the older type stub and remove the unneeded `__getattribute__` defs when the overlay is enabled.

PiperOrigin-RevId: 396688345
Support added for python literals and function calls (for type constructors).
Function calls are converted to dicts, and then all annotations are converted
to their repr strings to be stored in pytd.Annotated nodes.

Annotations are not yet preserved for round-tripping.

Also moves around some code to fix dependency issues.

PiperOrigin-RevId: 396696017
This is preliminary work for better support of attr.ib converters, which
interact with the field type in complicated ways.

PiperOrigin-RevId: 396945453
@google-cla google-cla Bot added the cla: yes label Sep 16, 2021
@rchen152 rchen152 merged commit 7731294 into master Sep 16, 2021
@rchen152 rchen152 deleted the google_sync branch September 16, 2021 18:49
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