-
Notifications
You must be signed in to change notification settings - Fork 271
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 #1257
Google sync #1257
Commits on Jul 18, 2022
-
I was curious and took a look at our opensource 3.11 CI results. There were two lint warnings, so I've fixed them. PiperOrigin-RevId: 460521319
Configuration menu - View commit details
-
Copy full SHA for 1e50be0 - Browse repository at this point
Copy the full SHA 1e50be0View commit details -
Handle .pyi-1 files in load_pytd.Module.is_package().
I also realized that the last time I changed is_package, I accidentally added an extra '.' in the .pickled extension for __init__ files (so they became __init__..pickled), but I did this both when unpickling and when checking the filename of the unpickled file, so it worked itself out. This has been fixed. For #1229. PiperOrigin-RevId: 460546845
Configuration menu - View commit details
-
Copy full SHA for 658b1c0 - Browse repository at this point
Copy the full SHA 658b1c0View commit details -
Teach pytype that builtins.code and types.CodeType are the same.
PiperOrigin-RevId: 460593975
Configuration menu - View commit details
-
Copy full SHA for ebf1d16 - Browse repository at this point
Copy the full SHA ebf1d16View commit details -
Adjust opcode line numbers for return statements in python 3.10+
Python 3.10 changed the way line numbers are assigned to `return` statements within `with` blocks, to attach to the `with` statement. This follows the actual control flow in the python interpreter, but makes it hard to report errors attached to the right line in the source code. We examine the AST and use the line number information from the parser to adjust the `RETURN_VALUE` opcodes to have the same line numbers as the source `return` statements that generated them. `RETURN_VALUE` opcodes corresponding to implicit `return None` continue to be moved to the last line of the function. PiperOrigin-RevId: 460639960
Configuration menu - View commit details
-
Copy full SHA for 65fb497 - Browse repository at this point
Copy the full SHA 65fb497View commit details -
Remove optimize.Factorize, which unnecessarily flattens overloaded fu…
…nctions. This optimization seems to be a holdover from when pytype inferred function argument types from function calls, which would generate multiple function signatures that needed to be flattened into a single signature. However, functions decorated with `typing.overload` are indistinguishable from these generated signatures, leading to overloaded functions being flattened. Since pytype no longer uses function call inference, Factorize is not needed. PiperOrigin-RevId: 460788149
Configuration menu - View commit details
-
Copy full SHA for 2adf76d - Browse repository at this point
Copy the full SHA 2adf76dView commit details -
PiperOrigin-RevId: 460837601
Configuration menu - View commit details
-
Copy full SHA for a19c309 - Browse repository at this point
Copy the full SHA a19c309View commit details -
Fix coroutine signatures in overriding_checks.
PiperOrigin-RevId: 460998756
Configuration menu - View commit details
-
Copy full SHA for 6b2c03d - Browse repository at this point
Copy the full SHA 6b2c03dView commit details -
Handle generic types correctly in signature compatibility checks.
IF THIS CL BROKE YOU: This change has gone through several TGPs, but given how many files it affects, it is highly likely a new breakage will appear in the lag between the final TGP and submission. If the breakage you are seeing follows the following pattern, please consider fixing forward before asking for a rollback. Known breakage pattern: File "<f>", line <d>, in <class>: Overriding method signature mismatch [signature-mismatch] Base signature: '<overridden method signature>'. Subclass signature: '<overriding method signature>'. Type mismatch for parameter '<parameter name>'. Fix: Add `# pytype: disable=signature-mismatch` to the end of line <d> in file <f>. If you have a [] id for the breakage, the []_patch tool can automatically add the directives for you: [] In case of emergency, you can pass `--define=PYTYPE=FALSE` to build a target broken by pytype. PiperOrigin-RevId: 461180641
Configuration menu - View commit details
-
Copy full SHA for b61ca53 - Browse repository at this point
Copy the full SHA b61ca53View commit details -
Respect NoReturn annotations even when maximum depth is reached.
This lets us fix some errors in 3.10 caused by pytype not descending into functions that always raise exceptions, by adding NoReturn annotations. Really we should use all return annotations, not just NoReturn, but this is a minimal change to unblock us for 3.10. PiperOrigin-RevId: 461257304
Configuration menu - View commit details
-
Copy full SHA for 1dcac94 - Browse repository at this point
Copy the full SHA 1dcac94View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2fdcd2 - Browse repository at this point
Copy the full SHA b2fdcd2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b045e8 - Browse repository at this point
Copy the full SHA 5b045e8View commit details