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

Adi Roiban adi at roiban.ro
Sat Jan 24 11:45:16 MST 2015


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?

Thanks!
-- 
Adi Roiban



More information about the Twisted-Python mailing list