Domanda

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 ?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top