From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 18 Oct 2019 18:08:50 -0400 Subject: [U-Boot] [PATCH 04/10] test/py: Automated conversion to Python 3 In-Reply-To: <0d8edbe1-0254-1f3b-5441-7de44170bc65@wwwdotorg.org> References: <20191018205338.14879-1-trini@konsulko.com> <20191018205338.14879-5-trini@konsulko.com> <0d8edbe1-0254-1f3b-5441-7de44170bc65@wwwdotorg.org> Message-ID: <20191018220850.GC16029@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Oct 18, 2019 at 03:12:06PM -0600, Stephen Warren wrote: > On 10/18/19 2:53 PM, Tom Rini wrote: > > Use the 2to3 tool to perform numerous automatic conversions from Python > > 2 syntax to Python 3. Also fix whitespace problems that Python 3 > > catches that Python 2 did not. > > > diff --git a/test/py/conftest.py b/test/py/conftest.py > > > import pytest > > from _pytest.runner import runtestprotocol > > import re > > -import StringIO > > +import io > > import sys > > I think that list used to be sorted. IIRC some PEP8 tools complain about > unsorted import lists. > > > -try: > > - import configparser > > -except: > > - import ConfigParser as configparser > > +import configparser > > Now that this is a plain import statement, let's put it with all the others > at the appropriate point in the sorted list above. > > > (Not sure if you want to merge fixes like this into this patch, or put them > in path 7?) I'll take care of both of those in patch 7, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: