[PATCHES] unshadow python methods

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Thu Oct 25 20:14:21 UTC 2018

On 26/10/18 3:16 AM, Volker Lendecke wrote:
> On Thu, Oct 25, 2018 at 10:38:01PM +1300, Douglas Bagnall via samba-technical wrote:
>> In Python, if you go:
>>     def foo(x):
>>         return x * 2
>>     def foo(x):
>>         return x * 3
>> the first definition will be silently ignored.
>> We do this in a few places.
>> CI: https://gitlab.com/samba-team/devel/samba/pipelines/34239680
>> (though if you look closely you will see I have split the first patch
>> there in two).
> Is there a lint-style checker for this? I'd imagine that this is
> pretty hard to spot in larger files.

These were found with pyflakes.

I am also looking at pylint and mypy, which complain more verbosely about
style but have no more semantic insight. Python linting is awful, all about
the placement of spaces when we want something like `gcc -Wall`.


More information about the samba-technical mailing list