[PATCHES] avoid "import *" in Python

Noel Power nopower at suse.com
Thu Oct 25 14:59:36 UTC 2018


On 25/10/2018 00:17, Douglas Bagnall via samba-technical wrote:
> In Python you can use "from foo import *" to get all the names defined
> by foo, including all the imports that foo makes. This is sometimes
> handy, but is considered bad form because it makes it hard to know what
> names you have and where they came from.
>
> These patches remove some cases of "import *" from our code by importing
> the things that are actually used.
>
> In some cases it turns out that hardly anything needed to be imported.
> In the other cases, selftesthelpers was involved. Feel free to reject
> those patches for the sheer increase in verbosity.
>
> https://gitlab.com/samba-team/devel/samba/pipelines/34091069
>
> Douglas

RB+ and pushed to autobuild with some other fixes


Noel




More information about the samba-technical mailing list