4cd1600b25
Removed use of contextlib.nested call from codebase, as it has been deprecated since Python 2.7. There are also known issues with contextlib.nested that were addressed by the native support for multiple "with" variables. For instance, if the first object is created but the second one throws an exception, the first object's __exit__ is never called. For more information see https://docs.python.org/2/library/contextlib.html#contextlib.nested contextlib.nested is also not compatible with Python 3. This is the first patch in a series for removing use of contextlib.nested. Added hacking check to catch if any new instances are added to the codebase. Line continuation markers (e.g. '\') had to be used or syntax errors were thrown. While using parentheses is the preferred way for multiple line statements, but in case of long with statements backslashes are acceptable. Partial-Bug: 1428424 Change-Id: I171fbdb89892a3d4548bf2ca52f4a7dd9ef8dccb |
||
---|---|---|
.. | ||
__init__.py | ||
checks.py |