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

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sat Jan 24 12:23:27 MST 2015


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.

Jean-Paul




More information about the Twisted-Python mailing list