Am 02.06.2020 um 18:44 hat John Snow geschrieben: > > > On 6/2/20 6:08 AM, Kevin Wolf wrote: > > Am 14.05.2020 um 07:53 hat John Snow geschrieben: > >> move python/qemu/*.py to python/qemu/lib/*.py. > >> > >> To create a namespace package, the 'qemu' directory itself shouldn't > >> have module files in it. Thus, these files will go under a 'lib' package > >> directory instead. > >> > >> Bolster the lib/__init__.py file a little bit, Make the top-level > >> classes and functions available directly inside the `qemu.lib` > >> namespace, to facilitate a convenient shorthand: > >> > >>> from qemu.lib import QEMUQtestMachine, QEMUMonitorProtocol > >> > >> Lastly, update all of the existing import directives. > >> > >> (Note: these scripts were not necessarily tested to see if they still > >> work. Some of these scripts are in obvious states of disrepair and it is > >> beyond the scope of this patch to attempt to fix them.) > >> > >> Signed-off-by: John Snow <js...@redhat.com> > >> --- > >> python/qemu/__init__.py | 11 ----- > > > > When trying to reproduce your mypy problem, I was wondering why mypy was > > complaining that it couldn't find qemu.lib. The reason is that removing > > __init__.py from qemu means it's not a valid module any more. If I > > recreate it locally, mypy stops complaining. > > > > So I think we need to leave this file here. > > > > Kevin > > > > Depends. You'll want --namespace-packages to parse a PEP420 namespace. > > (It's not a given we definitely want a PEP420 namespace, but that's what > I created here.)
I'm just running 297, so if this is how mypy should be called now, the series needs to make a change to 297. Kevin