2

What are these gray squiggly lines that are everywhere? Due to university policy i cant post code online so i blacked it out. However, this should be enough to see that this makes code awful to read.

Many Google searches did not lead me to anything that showed lines like these.

Picture

Ralf
  • 16,086
  • 4
  • 44
  • 68
Some Dude
  • 27
  • 5
  • 2
    What warning message appears when you hold your mouse pointer over the line with the gray underline? – Ralf May 17 '19 at 17:01
  • "PEP 8: expected 2 blank lines, found 1" Thats strange though because the code spacing looks normal to me. it compiles and runs. – Some Dude May 17 '19 at 17:51
  • "blank lines" is not the only one warning that is shown, right? – sanyassh May 17 '19 at 21:08

1 Answers1

3

In a comment to the question the OP clarified that the warning message for the gray-underlined lines says

"PEP 8: expected 2 blank lines, found 1"

Here is a similar question.

The relevant section about blank lines of the PEP-8 style guide says:

Surround top-level function and class definitions with two blank lines.

Your code shows top-level functions that only have a single blank line between them. Add another line between them to make the warning disapear or configure PyCharm to omit those warnings.


There are a few more suggestions/guidlnes on blank lines you can read in the link I added. Just remember that these are guidelines, not hard rules. Your code will run regardless of these suggestions.

Ralf
  • 16,086
  • 4
  • 44
  • 68