[Python] How do I correctly indent this line of code?

Discussão em 'Python' iniciado por Stack, Julho 30, 2025.

  1. Stack

    Stack Membro Participativo

    I read a little bit of PEP 8's conventions and I wondered how to correctly indent this long line of code.

    WebDriverWait(self.driver, 5).until(EC.presence_of_element_located((By.CSS_SELECTOR, "#react-root > section > nav > div._8MQSO.Cx7Bp > div > div > div.LWmhU._0aCwM > div.yPP5B > div > div._01UL2 > div > div:nth-child(1) > a"))).click()

    My try:

    WebDriverWait(self.driver, 5).until(
    EC.presence_of_element_located((By.CSS_SELECTOR, """
    #react-root > section > nav > div._8MQSO.Cx7Bp > div > div > div.LWmhU._0aCwM
    > div.yPP5B > div > div._01UL2 > div > div:nth-child(1) > a
    """))
    ).click()

    Continue reading...

Compartilhe esta Página