[Freeipa-devel] [PATCH 0042] Make lint work on Fedora 22.

David Kupka dkupka at redhat.com
Wed Apr 8 08:22:04 UTC 2015


On 04/06/2015 02:48 PM, Simo Sorce wrote:
> On Mon, 2015-03-30 at 12:15 +0200, David Kupka wrote:
>> On 03/30/2015 07:12 AM, Jan Cholasta wrote:
>>> Dne 28.3.2015 v 00:05 Petr Vobornik napsal(a):
>>>> On 27.3.2015 14:58, David Kupka wrote:
>>>>> pylint changed slightly so we must react otherwise we'll be unable to
>>>>> build freeipa rpms on Fedora 22. This patch should go to master for sure
>>>>> but I don't know if we want it in 4.1.
>>>>>
>>>>
>>>> ACK
>>>
>>> Are all the new disables really just false positives?
>>
>> It seems to me as a false positives.
>>
>> 1. ipalib/plugins/otptoken.py:552: [E1101(no-member),
>> otptoken_sync.forward] Module 'ssl' has no 'PROTOCOL_TLSv1' member)
>>
>>   >>> import ssl
>>   >>> ssl.PROTOCOL_TLSv1
>> 3
>>
>> 2. ipaserver/install/ipa_otptoken_import.py:63: [E1101(no-member),
>> convertDate] Instance of 'tuple' has no 'tzinfo' member)
>> ipaserver/install/ipa_otptoken_import.py:64: [E1101(no-member),
>> convertDate] Instance of 'tuple' has no 'timetuple' member)
>>
>> dateutil.parser.parse() returns datetime.datetime object and it has
>> both tzinfo and timetuple methods
>> (https://docs.python.org/2/library/datetime.html#datetime-objects)
>>
>> 3. ipapython/dnssec/ldapkeydb.py:26: [E1127(invalid-slice-index),
>> uri_escape] Slice index is not an int, None, or instance with __index__)
>>
>> This is the line lint is complaining about:
>> out += '%'.join(hexval[i:i+2] for i in range(0, len(hexval), 2))
>> I don't see a chance for 'i' or 'i+1' to be anything else than integers.
>>
>>>
>>>>
>>>> tested on:
>>>> - F21: ipa-4-1, master branch
>>>> - F22: master branch.
>>>>
>>>> IMHO it could got to ipa-4-1 branch because of FreeIPA 4.1.4 in F22
>>>
>
> This patch doesn't seem to fix all my issues building on F22, so
> tentative NACK.

I tested it this way:
1. started with Fedora-22-x86_64-minimal system
2. dnf install git
3. clone freeipa
4. make version-update # to get freeipa.spec
5. dnf install `awk '/^BuildRequires/ {print $2}' freeipa.spec`
6. ./make-lint

>
> It seem the main offenders are "No value for argument 'second' in method
> call" (this one only in test_ipautul.py) and "No value for argument
> 'extClass' in method call" sprinkled around various test plugins.
> These cause E1120(no-value-for-parameter).

Could you please paste the output of make-lint somewhere?
>
> On a different note, make-lint takes forever to run, do we really need
> to run it in make rpms ? Shouldn't we rather just run it at make dist
> time, or whatever we use to generate the release tarballs ?

It really takes forever and it would be nice to move it out of 
Makefile's rpms target but I don't know if we can do it without breaking 
anything.

>
> Simo.
>

-- 
David Kupka




More information about the Freeipa-devel mailing list