Question

if(re.search("USN:.*MediaRenderer", datagram, flags=re.IGNORECASE)):
    deviceXML = re.search("LOCATION:(.*.xml)", datagram, flags=re.IGNORECASE).group(1)

I am getting pytlint error "line too long" for 2nd line

How to correct this ?

Was it helpful?

Solution

Cut your line to meet the length (80 chars usually):

if(re.search("USN:.*MediaRenderer", datagram, flags=re.IGNORECASE)):
    deviceXML = re.search("LOCATION:(.*.xml)",
                          datagram, 
                          flags=re.IGNORECASE).group(1)

Or use your own customization of pylint.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top