pycodestyle/flake8 feedback in Python 3
etowncodes (1)

New to trying pycodestyle or flake8 package and want to get my students to utilize it to style code properly. Working in Python 3.

How do you get the "feedback" to output in the terminal? In other words, how do I get this to show?

code.py:1:17: E231 missing whitespace after ','

You are viewing a single comment. View All
Zavexeon (252)

Could you link your code or provide the snippet you are referring to, please?

It'll make it easier for us to help you.

etowncodes (1)

@Zavexeon Thanks for checking in on this! I import flake8 from packages in a repl. Let's suppose the code is this:


import flake8

X = "Zach"

print("Hi",X)

I would believe that two issues--the capitalization of X and the lack of whitespace after the comma in the print statement--should return a style "warning". I don't see anything when I do.*

*note--importing pycodestyle didn't seem to work at all.

Zavexeon (252)

@etowncodes Oh, I understand what you mean. The reason this may not be working is with some limitations with repl.it The compiler is what sees errors and reports them, and we regular users can't actually modify the compiler or install anything on their servers.

Packages like discordpy and stuff like that are hosted externally from replit, which is why they work. What you seem to be trying is to install something internally, which replit does not support, to my knowledge.

etowncodes (1)

@Zavexeon Thanks so much. Hard to know why sometimes, especially when it makes it look like you are importing it. I appreciate your time!