PyCharm shows "PEP8: expected 2 blank lines, found 1"

Just add another line between your function definitions :

1 line :

enter image description here

2 lines:

enter image description here


This is a pretty common question within the python community. After the release of PEP 8, new formatting styles were accepted into python. One of them states that after the definition of a class or function there must be two lines separating them. As such:

    def yadayada:
     print("two lines between the functions")


    def secondyadayada:
     print("this is the proper formatting")

So, you should never do it like:

    def yadayada:
     print("two lines between the functions")

    def secondyadayada:
     print("this is the proper formatting")

Or else PyCharm will throw that error at you.