[Twisted-Python] twistedchecker - Names of constant which are used as configuration options

Adi Roiban adi at roiban.ro
Sat Jan 24 12:51:10 MST 2015


On 24 January 2015 at 19:23,  <exarkun at twistedmatrix.com> wrote:
> On 06:45 pm, adi at roiban.ro wrote:
>>
>> Hi,
>>
>> Why reviewing a patch I got into this error from twistedchecker.
>> This is old code, just that someone it was touched by recent changes,
>>
>> C0103:574,12:NetstringReceiverTests.test_buffer: Invalid name
>> "MAX_LENGTH" for type attribute (should match
>> ((([a-z_])|([a-z]+_[a-z]))[a-zA-Z0-9]+)$)
>>
>> The code is like this, where TestNetstring is a line receiver
>> protocol... so MAX_LENGTH act as a configuration option.
>>
>>            a = TestNetstring()
>>            a.MAX_LENGTH = 699
>>
>> What to do in this case and how I can have  this code accepted by
>> twistedchecker?
>
>
> Fix twistedchecker.  MAX_LENGTH doesn't violate the Twisted naming
> convention.

Thanks.

Found the report: https://github.com/twisted/twistedchecker/issues/52

Hope it will be easy to fix,
-- 
Adi Roiban




More information about the Twisted-Python mailing list