[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module
From: |
Kevin Wolf |
Subject: |
Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module |
Date: |
Tue, 2 Jun 2020 12:08:37 +0200 |
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 <jsnow@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
- Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module,
Kevin Wolf <=